Microsoft Visual C++ compiler has the property declaration construction
__declspec( property( get=get_func_name, put=put_func_name ) )
Is there a compiler independent version of Microsoft C++ __declspec(property(…)) or another analogs?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
No.
As usual, an identifier preceded by
__is reserved to the compiler. In C++03 you have__cpluscplus(to identify C++ vs C),__FILE__and__LINE__. All those are preprocessor entities.In C++0x, the difference is blurred by the introduction of the
__attribute__word which is the first I know of that has semantics value, but it still does not do what you’re looking for.EDIT: Addressing @James spot on comment.