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 2011,2012,2013
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_MEM_TYPE_HPP)
0008 #define BOOST_TTI_DETAIL_MEM_TYPE_HPP
0009 
0010 #include <boost/config.hpp>
0011 #include <boost/mpl/bool.hpp>
0012 #include <boost/mpl/eval_if.hpp>
0013 #include <boost/mpl/has_xxx.hpp>
0014 #include <boost/preprocessor/cat.hpp>
0015 #include <boost/tti/detail/denclosing_type.hpp>
0016 #include <boost/tti/gen/namespace_gen.hpp>
0017 
0018 #define BOOST_TTI_DETAIL_TRAIT_HAS_TYPE_MEMBER_TYPE_OP(trait,name) \
0019   BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(BOOST_PP_CAT(trait,_detail_member_type_mpl), name, false) \
0020   template<class BOOST_TTI_DETAIL_TP_T> \
0021   struct BOOST_PP_CAT(trait,_detail_member_type_op) : \
0022     BOOST_PP_CAT(trait,_detail_member_type_mpl)<BOOST_TTI_DETAIL_TP_T> \
0023     { \
0024     }; \
0025 /**/
0026 
0027 #define BOOST_TTI_DETAIL_TRAIT_HAS_TYPE_MEMBER_TYPE(trait,name) \
0028   BOOST_TTI_DETAIL_TRAIT_HAS_TYPE_MEMBER_TYPE_OP(trait,name) \
0029   template<class BOOST_TTI_DETAIL_TP_T> \
0030   struct BOOST_PP_CAT(trait,_detail_has_type_member_type) \
0031     { \
0032     typedef typename \
0033     boost::mpl::eval_if \
0034         < \
0035         BOOST_TTI_NAMESPACE::detail::enclosing_type<BOOST_TTI_DETAIL_TP_T>, \
0036         BOOST_PP_CAT(trait,_detail_member_type_op)<BOOST_TTI_DETAIL_TP_T>, \
0037         boost::mpl::false_ \
0038         >::type type; \
0039     \
0040     BOOST_STATIC_CONSTANT(bool,value=type::value); \
0041     }; \
0042 /**/
0043 
0044 #define BOOST_TTI_DETAIL_TRAIT_MEMBER_TYPE(trait,name) \
0045   template<class BOOST_TTI_DETAIL_TP_T> \
0046   struct BOOST_PP_CAT(trait,_detail_member_type) \
0047     { \
0048     typedef typename BOOST_TTI_DETAIL_TP_T::name type; \
0049     }; \
0050 /**/
0051 
0052 #endif // BOOST_TTI_DETAIL_MEM_TYPE_HPP