diff --git a/include/boost/mpl/aux_/has_xxx.hpp b/include/boost/mpl/aux_/has_xxx.hpp index 56ca6f0..0e2fe9e 100644 --- a/include/boost/mpl/aux_/has_xxx.hpp +++ b/include/boost/mpl/aux_/has_xxx.hpp @@ -30,28 +30,26 @@ // the implementation below is based on a USENET newsgroup's posting by // Rani Sharoni (comp.lang.c++.moderated, 2002-03-17 07:45:09 PST) -# define BOOST_MPL_HAS_XXX_TRAIT_DEF(name) \ -template< typename T > \ -boost::mpl::aux::yes_tag \ -has_##name##_helper( \ - boost::mpl::aux::type_wrapper* \ - , BOOST_MSVC_TYPENAME T::name* \ - ); \ -\ -template< typename T > \ -boost::mpl::aux::no_tag has_##name##_helper( \ - boost::mpl::aux::type_wrapper* \ - , ... \ - ); \ -\ -template< typename T > \ -struct has_##name \ -{ \ - BOOST_STATIC_CONSTANT(bool, value = \ - sizeof(has_##name##_helper((boost::mpl::aux::type_wrapper*)0, 0)) \ - == sizeof(boost::mpl::aux::yes_tag) \ - ); \ -}; \ +# define BOOST_MPL_HAS_XXX_TRAIT_DEF(name) \ +template< typename T > \ +boost::mpl::aux::yes_tag \ +has_##name##_helper( \ + boost::mpl::aux::type_wrapper* \ + , void (*)(BOOST_MSVC_TYPENAME T::name) = 0 \ + ); \ + \ +boost::mpl::aux::no_tag has_##name##_helper( \ + ... \ + ); \ + \ +template< typename T > \ +struct has_##name \ +{ \ + BOOST_STATIC_CONSTANT(bool, value = \ + sizeof((has_##name##_helper)((boost::mpl::aux::type_wrapper*)0)) \ + == sizeof(boost::mpl::aux::yes_tag) \ + ); \ +}; \ /**/ # else