Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:52:54

0001 
0002 //  (C) Copyright Edward Diener 2019
0003 //  Use, modification and distribution are subject to the Boost Software License,
0004 //  Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
0005 //  http://www.boost.org/LICENSE_1_0.txt).
0006 
0007 #if !defined(BOOST_TTI_DETAIL_STATIC_MEM_FUN_TEMPLATE_HPP)
0008 #define BOOST_TTI_DETAIL_STATIC_MEM_FUN_TEMPLATE_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/preprocessor/array/enum.hpp>
0015 #include <boost/tti/detail/dmacro_sunfix.hpp>
0016 #include <boost/tti/detail/dnullptr.hpp>
0017 #include <boost/tti/detail/dtfunction.hpp>
0018 #include <boost/tti/detail/denclosing_type.hpp>
0019 #include <boost/tti/detail/dstatic_function_tags.hpp>
0020 #include <boost/tti/detail/dstatic_function_type.hpp>
0021 #include <boost/tti/gen/namespace_gen.hpp>
0022 #include <boost/type_traits/detail/yes_no_type.hpp>
0023 
0024 #define BOOST_TTI_DETAIL_TRAIT_IMPL_HAS_STATIC_MEMBER_FUNCTION_TEMPLATE(trait,name,pparray) \
0025   template<class BOOST_TTI_DETAIL_TP_T,class BOOST_TTI_DETAIL_TP_TYPE> \
0026   struct BOOST_PP_CAT(trait,_detail_ihsmft) \
0027     { \
0028     template<BOOST_TTI_DETAIL_TP_TYPE *> \
0029     struct helper BOOST_TTI_DETAIL_MACRO_SUNFIX ; \
0030     \
0031     template<class U> \
0032     static ::boost::type_traits::yes_type check(helper<&U::template name<BOOST_PP_ARRAY_ENUM(pparray)> > *); \
0033     \
0034     template<class U> \
0035     static ::boost::type_traits::no_type check(...); \
0036     \
0037     typedef boost::mpl::bool_<sizeof(check<BOOST_TTI_DETAIL_TP_T>(BOOST_TTI_DETAIL_NULLPTR))==sizeof(::boost::type_traits::yes_type)> type; \
0038     }; \
0039 /**/
0040 
0041 #define BOOST_TTI_DETAIL_TRAIT_HAS_STATIC_MEMBER_FUNCTION_TEMPLATE_TEST_FUNC_CALL(trait,name,pparray) \
0042   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> \
0043   struct BOOST_PP_CAT(trait,_detail_hsmft_ttc) : \
0044     BOOST_PP_CAT(trait,_detail_ihsmft) \
0045       < \
0046       BOOST_TTI_DETAIL_TP_T, \
0047       typename BOOST_TTI_NAMESPACE::detail::tfunction_seq<BOOST_TTI_DETAIL_TP_R,BOOST_TTI_DETAIL_TP_FS,BOOST_TTI_DETAIL_TP_TAG>::type \
0048       > \
0049     { \
0050     }; \
0051 /**/
0052 
0053 #define BOOST_TTI_DETAIL_TRAIT_HAS_STATIC_MEMBER_FUNCTION_TEMPLATE_TEST_FUNC(trait,name,pparray) \
0054   BOOST_TTI_DETAIL_TRAIT_HAS_STATIC_MEMBER_FUNCTION_TEMPLATE_TEST_FUNC_CALL(trait,name,pparray) \
0055   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> \
0056   struct BOOST_PP_CAT(trait,_detail_hsmft_tt) : \
0057     boost::mpl::eval_if \
0058       < \
0059       BOOST_TTI_NAMESPACE::detail::static_function_tag<BOOST_TTI_DETAIL_TP_TAG>, \
0060       BOOST_PP_CAT(trait,_detail_hsmft_ttc)<BOOST_TTI_DETAIL_TP_T,BOOST_TTI_DETAIL_TP_R,BOOST_TTI_DETAIL_TP_FS,BOOST_TTI_DETAIL_TP_TAG>, \
0061       boost::mpl::false_ \
0062       > \
0063     { \
0064     }; \
0065 /**/
0066 
0067 #define BOOST_TTI_DETAIL_TRAIT_HAS_STATIC_MEMBER_FUNCTION_TEMPLATE_OP(trait,name,pparray) \
0068   BOOST_TTI_DETAIL_TRAIT_IMPL_HAS_STATIC_MEMBER_FUNCTION_TEMPLATE(trait,name,pparray) \
0069   BOOST_TTI_DETAIL_TRAIT_HAS_STATIC_MEMBER_FUNCTION_TEMPLATE_TEST_FUNC(trait,name,pparray) \
0070   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> \
0071   struct BOOST_PP_CAT(trait,_detail_hsmft_op) : \
0072     boost::mpl::eval_if \
0073       < \
0074       BOOST_TTI_NAMESPACE::detail::static_function_type<BOOST_TTI_DETAIL_TP_R,BOOST_TTI_DETAIL_TP_FS,BOOST_TTI_DETAIL_TP_TAG>, \
0075       BOOST_PP_CAT(trait,_detail_ihsmft)<BOOST_TTI_DETAIL_TP_T,BOOST_TTI_DETAIL_TP_R>, \
0076       BOOST_PP_CAT(trait,_detail_hsmft_tt)<BOOST_TTI_DETAIL_TP_T,BOOST_TTI_DETAIL_TP_R,BOOST_TTI_DETAIL_TP_FS,BOOST_TTI_DETAIL_TP_TAG> \
0077       > \
0078     { \
0079     }; \
0080 /**/
0081 
0082 #define BOOST_TTI_DETAIL_TRAIT_HAS_STATIC_MEMBER_FUNCTION_TEMPLATE(trait,name,pparray) \
0083   BOOST_TTI_DETAIL_TRAIT_HAS_STATIC_MEMBER_FUNCTION_TEMPLATE_OP(trait,name,pparray) \
0084   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> \
0085   struct BOOST_PP_CAT(trait,_detail_hsmft) : \
0086     boost::mpl::eval_if \
0087         < \
0088         BOOST_TTI_NAMESPACE::detail::enclosing_type<BOOST_TTI_DETAIL_TP_T>, \
0089         BOOST_PP_CAT(trait,_detail_hsmft_op)<BOOST_TTI_DETAIL_TP_T,BOOST_TTI_DETAIL_TP_R,BOOST_TTI_DETAIL_TP_FS,BOOST_TTI_DETAIL_TP_TAG>, \
0090         boost::mpl::false_ \
0091         > \
0092     { \
0093     }; \
0094 /**/
0095 
0096 #endif // BOOST_TTI_DETAIL_STATIC_MEM_FUN_TEMPLATE_HPP