c++.stlsoft - [STLSoft] method properties, or, "With a Little Help from My Friends"
- Martin Moene (21/21) Jun 14 2008 Hi Matthew,
- Martin Moene (15/45) Jun 15 2008 Well,
Hi Matthew, When I was trying out a (get) method property, it took me some time to find out that the errors I got are caused by the (lack of) capability of the compiler used (VC6 and GCC 3.4.2). To make a long story short, I think it would be helpful if compilers that cannot use and therefore do not define STLSOFT_METHOD_PROPERTY_SET_EXTERNAL_PROP STLSOFT_METHOD_PROPERTY_GETSET_EXTERNAL_PROP would report that fact via a #error, for example as in #else /* ? STLSOFT_CF_MEM_FUNC_AS_TEMPLATE_PARAM_SUPPORT */ #endif /* STLSOFT_CF_MEM_FUNC_AS_TEMPLATE_PARAM_SUPPORT */ With an emphasis on *set*. By the looks of stlsoft/properties/method_properties.hpp, it seems there are compilers whithout STLSOFT_CF_MEM_FUNC_AS_TEMPLATE_PARAM_SUPPORT capability that can support STLSOFT_METHOD_PROPERTY_GET_EXTERNAL_PROP but VC6 and GCC 3.4.2 seem not to be one of these. Unfortunately VC6 or GCC 3.4.2 do not report an error that explains this incapability when compiling such a get method. So may be STLSoft can provide some help here too? Cheers, Martin.
Jun 14 2008
Martin Moene wrote:Hi Matthew, When I was trying out a (get) method property, it took me some time to find out that the errors I got are caused by the (lack of) capability of the compiler used (VC6 and GCC 3.4.2). To make a long story short, I think it would be helpful if compilers that cannot use and therefore do not define STLSOFT_METHOD_PROPERTY_SET_EXTERNAL_PROP STLSOFT_METHOD_PROPERTY_GETSET_EXTERNAL_PROP would report that fact via a #error, for example as in #else /* ? STLSOFT_CF_MEM_FUNC_AS_TEMPLATE_PARAM_SUPPORT */ #endif /* STLSOFT_CF_MEM_FUNC_AS_TEMPLATE_PARAM_SUPPORT */ With an emphasis on *set*.Well, using #error as shown above, also inhibits use of a property get method (STLSOFT_METHOD_PROPERTY_GET_EXTERNAL) where its use would be possible. Not a good idea... The error should occur when we /use/ the property set method when the compiler cannot provide us with that. However just expanding to #error is not possible: #error Error: Compiler is not compatible with method set properties. Maybe the following is a possible solution? Error_Compiler_is_not_compatible_with_method_set_properties which yields an undeclared identifier error. Cheers, Martin.By the looks of stlsoft/properties/method_properties.hpp, it seems there are compilers whithout STLSOFT_CF_MEM_FUNC_AS_TEMPLATE_PARAM_SUPPORT capability that can support STLSOFT_METHOD_PROPERTY_GET_EXTERNAL_PROP but VC6 and GCC 3.4.2 seem not to be one of these. Unfortunately VC6 or GCC 3.4.2 do not report an error that explains this incapability when compiling such a get method. So may be STLSoft can provide some help here too? Cheers, Martin.
Jun 15 2008