
On 7/10/2011 7:59 PM, Lorenzo Caminiti wrote:
HAS_MEMBER_VARIABLE(has_myvar, [static] myvar) HAS_MEMBER_FUNCTION(has_myfunc, [static] myfunc)
I can easily combine BOOST_TTI_HAS_MEMBER_DATA and BOOST_TTI_HAS_STATIC_MEMBER_FUNCTION into HAS_MEMBER_VARIABLE, which covers either case, and BOOST_TTI_HAS_MEMBER_FUNCTION and BOOST_TTI_HAS_STATIC_MEMBER_FUNCTION into a HAS_MEMBER_FUNCTION, which cover either case. But then the end-user will lose the ability to distinguish between a 'member data/static member data' or 'member function/static member function'. Do you really think that is the correct thing to do just because you think there are too many macros ? I do not.
I think Lorenzo was suggesting having a single macro whose implementation checks whether the second argument starts with the token "static"; if so it performs a check for static functions only, otherwise it performs a check for nonstatic functions only. Checking whether a macro argument starts with a particular token is certainly doable; see for example [1]. Regards, Nate. [1] http://lists.boost.org/boost-users/2011/03/66612.php