Chris@16: Chris@16: // (C) Copyright Edward Diener 2011,2012,2013 Chris@16: // Use, modification and distribution are subject to the Boost Software License, Chris@16: // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at Chris@16: // http://www.boost.org/LICENSE_1_0.txt). Chris@16: Chris@16: #if !defined(BOOST_TTI_DETAIL_COMP_MEM_FUN_HPP) Chris@16: #define BOOST_TTI_DETAIL_COMP_MEM_FUN_HPP Chris@16: Chris@16: #include Chris@16: #include Chris@16: #include Chris@16: #include Chris@16: #include Chris@16: #include Chris@16: #include Chris@16: #include Chris@16: Chris@101: #if defined(__SUNPRO_CC) Chris@101: Chris@101: #define BOOST_TTI_DETAIL_TRAIT_HAS_COMP_MEMBER_FUNCTION(trait,name) \ Chris@101: template \ Chris@101: struct BOOST_PP_CAT(trait,_detail_hcmf) \ Chris@101: { \ Chris@101: template \ Chris@101: struct cl_type : \ Chris@101: boost::remove_const \ Chris@101: < \ Chris@101: typename BOOST_TTI_NAMESPACE::detail::class_type::type \ Chris@101: > \ Chris@101: { \ Chris@101: }; \ Chris@101: \ Chris@101: template \ Chris@101: struct helper {}; \ Chris@101: \ Chris@101: template \ Chris@101: static ::boost::type_traits::yes_type chkt(helper<&BOOST_TTI_DETAIL_TP_U::name> *); \ Chris@101: \ Chris@101: template \ Chris@101: static ::boost::type_traits::no_type chkt(...); \ Chris@101: \ Chris@101: typedef boost::mpl::bool_::type>(BOOST_TTI_DETAIL_NULLPTR))==sizeof(::boost::type_traits::yes_type)> type; \ Chris@101: }; \ Chris@101: /**/ Chris@101: Chris@101: #else Chris@101: Chris@16: #define BOOST_TTI_DETAIL_TRAIT_HAS_COMP_MEMBER_FUNCTION(trait,name) \ Chris@16: template \ Chris@16: struct BOOST_PP_CAT(trait,_detail_hcmf) \ Chris@16: { \ Chris@16: template \ Chris@16: struct cl_type : \ Chris@16: boost::remove_const \ Chris@16: < \ Chris@16: typename BOOST_TTI_NAMESPACE::detail::class_type::type \ Chris@16: > \ Chris@16: { \ Chris@16: }; \ Chris@16: \ Chris@16: template \ Chris@16: struct helper; \ Chris@16: \ Chris@16: template \ Chris@16: static ::boost::type_traits::yes_type chkt(helper<&BOOST_TTI_DETAIL_TP_U::name> *); \ Chris@16: \ Chris@16: template \ Chris@16: static ::boost::type_traits::no_type chkt(...); \ Chris@16: \ Chris@101: typedef boost::mpl::bool_::type>(BOOST_TTI_DETAIL_NULLPTR))==sizeof(::boost::type_traits::yes_type)> type; \ Chris@16: }; \ Chris@16: /**/ Chris@16: Chris@101: #endif Chris@101: Chris@101: Chris@16: #endif // BOOST_TTI_DETAIL_COMP_MEM_FUN_HPP