File indexing completed on 2025-01-18 09:52:54
0001
0002
0003
0004
0005
0006
0007 #if !defined(BOOST_TTI_DETAIL_STATIC_MEM_FUN_HPP)
0008 #define BOOST_TTI_DETAIL_STATIC_MEM_FUN_HPP
0009
0010 #include <boost/mpl/bool.hpp>
0011 #include <boost/mpl/eval_if.hpp>
0012 #include <boost/mpl/identity.hpp>
0013 #include <boost/preprocessor/cat.hpp>
0014 #include <boost/tti/detail/dnullptr.hpp>
0015 #include <boost/tti/detail/dmacro_sunfix.hpp>
0016 #include <boost/tti/detail/dtfunction.hpp>
0017 #include <boost/tti/detail/denclosing_type.hpp>
0018 #include <boost/tti/detail/dstatic_function_tags.hpp>
0019 #include <boost/tti/detail/dstatic_function_type.hpp>
0020 #include <boost/tti/gen/namespace_gen.hpp>
0021 #include <boost/type_traits/detail/yes_no_type.hpp>
0022
0023 #define BOOST_TTI_DETAIL_TRAIT_IMPL_HAS_STATIC_MEMBER_FUNCTION(trait,name) \
0024 template<class BOOST_TTI_DETAIL_TP_T,class BOOST_TTI_DETAIL_TP_TYPE> \
0025 struct BOOST_PP_CAT(trait,_detail_ihsmf) \
0026 { \
0027 template<BOOST_TTI_DETAIL_TP_TYPE *> \
0028 struct helper BOOST_TTI_DETAIL_MACRO_SUNFIX ; \
0029 \
0030 template<class BOOST_TTI_DETAIL_TP_U> \
0031 static ::boost::type_traits::yes_type chkt(helper<&BOOST_TTI_DETAIL_TP_U::name> *); \
0032 \
0033 template<class BOOST_TTI_DETAIL_TP_U> \
0034 static ::boost::type_traits::no_type chkt(...); \
0035 \
0036 typedef boost::mpl::bool_<sizeof(chkt<BOOST_TTI_DETAIL_TP_T>(BOOST_TTI_DETAIL_NULLPTR))==sizeof(::boost::type_traits::yes_type)> type; \
0037 }; \
0038
0039
0040 #define BOOST_TTI_DETAIL_TRAIT_HAS_STATIC_MEMBER_FUNCTION_TEST_FUNC_CALL(trait,name) \
0041 template<class BOOST_TTI_DETAIL_TP_T,class BOOST_TTI_DETAIL_TP_R,class BOOST_TTI_DETAIL_TP_FS,class BOOST_TTI_DETAIL_TP_TAG> \
0042 struct BOOST_PP_CAT(trait,_detail_hsmf_ttc) : \
0043 BOOST_PP_CAT(trait,_detail_ihsmf) \
0044 < \
0045 BOOST_TTI_DETAIL_TP_T, \
0046 typename BOOST_TTI_NAMESPACE::detail::tfunction_seq<BOOST_TTI_DETAIL_TP_R,BOOST_TTI_DETAIL_TP_FS,BOOST_TTI_DETAIL_TP_TAG>::type \
0047 > \
0048 { \
0049 }; \
0050
0051
0052 #define BOOST_TTI_DETAIL_TRAIT_HAS_STATIC_MEMBER_FUNCTION_TEST_FUNC(trait,name) \
0053 BOOST_TTI_DETAIL_TRAIT_HAS_STATIC_MEMBER_FUNCTION_TEST_FUNC_CALL(trait,name) \
0054 template<class BOOST_TTI_DETAIL_TP_T,class BOOST_TTI_DETAIL_TP_R,class BOOST_TTI_DETAIL_TP_FS,class BOOST_TTI_DETAIL_TP_TAG> \
0055 struct BOOST_PP_CAT(trait,_detail_hsmf_tt) : \
0056 boost::mpl::eval_if \
0057 < \
0058 BOOST_TTI_NAMESPACE::detail::static_function_tag<BOOST_TTI_DETAIL_TP_TAG>, \
0059 BOOST_PP_CAT(trait,_detail_hsmf_ttc)<BOOST_TTI_DETAIL_TP_T,BOOST_TTI_DETAIL_TP_R,BOOST_TTI_DETAIL_TP_FS,BOOST_TTI_DETAIL_TP_TAG>, \
0060 boost::mpl::false_ \
0061 > \
0062 { \
0063 }; \
0064
0065
0066 #define BOOST_TTI_DETAIL_TRAIT_HAS_STATIC_MEMBER_FUNCTION_OP(trait,name) \
0067 BOOST_TTI_DETAIL_TRAIT_IMPL_HAS_STATIC_MEMBER_FUNCTION(trait,name) \
0068 BOOST_TTI_DETAIL_TRAIT_HAS_STATIC_MEMBER_FUNCTION_TEST_FUNC(trait,name) \
0069 template<class BOOST_TTI_DETAIL_TP_T,class BOOST_TTI_DETAIL_TP_R,class BOOST_TTI_DETAIL_TP_FS,class BOOST_TTI_DETAIL_TP_TAG> \
0070 struct BOOST_PP_CAT(trait,_detail_hsmf_op) : \
0071 boost::mpl::eval_if \
0072 < \
0073 BOOST_TTI_NAMESPACE::detail::static_function_type<BOOST_TTI_DETAIL_TP_R,BOOST_TTI_DETAIL_TP_FS,BOOST_TTI_DETAIL_TP_TAG>, \
0074 BOOST_PP_CAT(trait,_detail_ihsmf)<BOOST_TTI_DETAIL_TP_T,BOOST_TTI_DETAIL_TP_R>, \
0075 BOOST_PP_CAT(trait,_detail_hsmf_tt)<BOOST_TTI_DETAIL_TP_T,BOOST_TTI_DETAIL_TP_R,BOOST_TTI_DETAIL_TP_FS,BOOST_TTI_DETAIL_TP_TAG> \
0076 > \
0077 { \
0078 }; \
0079
0080
0081 #define BOOST_TTI_DETAIL_TRAIT_HAS_STATIC_MEMBER_FUNCTION(trait,name) \
0082 BOOST_TTI_DETAIL_TRAIT_HAS_STATIC_MEMBER_FUNCTION_OP(trait,name) \
0083 template<class BOOST_TTI_DETAIL_TP_T,class BOOST_TTI_DETAIL_TP_R,class BOOST_TTI_DETAIL_TP_FS,class BOOST_TTI_DETAIL_TP_TAG> \
0084 struct BOOST_PP_CAT(trait,_detail_hsmf) : \
0085 boost::mpl::eval_if \
0086 < \
0087 BOOST_TTI_NAMESPACE::detail::enclosing_type<BOOST_TTI_DETAIL_TP_T>, \
0088 BOOST_PP_CAT(trait,_detail_hsmf_op)<BOOST_TTI_DETAIL_TP_T,BOOST_TTI_DETAIL_TP_R,BOOST_TTI_DETAIL_TP_FS,BOOST_TTI_DETAIL_TP_TAG>, \
0089 boost::mpl::false_ \
0090 > \
0091 { \
0092 }; \
0093
0094
0095 #endif