annotate DEPENDENCIES/generic/include/boost/tti/detail/dtemplate.hpp @ 133:4acb5d8d80b6 tip

Don't fail environmental check if README.md exists (but .txt and no-suffix don't)
author Chris Cannam
date Tue, 30 Jul 2019 12:25:44 +0100
parents c530137014c0
children
rev   line source
Chris@16 1
Chris@16 2 // (C) Copyright Edward Diener 2011,2012,2013
Chris@16 3 // Use, modification and distribution are subject to the Boost Software License,
Chris@16 4 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
Chris@16 5 // http://www.boost.org/LICENSE_1_0.txt).
Chris@16 6
Chris@16 7 #if !defined(BOOST_TTI_DETAIL_TEMPLATE_HPP)
Chris@16 8 #define BOOST_TTI_DETAIL_TEMPLATE_HPP
Chris@16 9
Chris@16 10 #include <boost/config.hpp>
Chris@101 11 #include <boost/mpl/bool.hpp>
Chris@101 12 #include <boost/mpl/eval_if.hpp>
Chris@16 13 #include <boost/mpl/has_xxx.hpp>
Chris@16 14 #include <boost/preprocessor/cat.hpp>
Chris@16 15 #include <boost/preprocessor/debug/assert.hpp>
Chris@16 16 #include <boost/preprocessor/facilities/is_empty.hpp>
Chris@101 17 #include <boost/type_traits/is_class.hpp>
Chris@16 18
Chris@16 19 #define BOOST_TTI_DETAIL_IS_HELPER_BOOST_PP_NIL
Chris@16 20
Chris@16 21 #define BOOST_TTI_DETAIL_IS_NIL(param) \
Chris@16 22 BOOST_PP_IS_EMPTY \
Chris@16 23 ( \
Chris@16 24 BOOST_PP_CAT(BOOST_TTI_DETAIL_IS_HELPER_,param) \
Chris@16 25 ) \
Chris@16 26 /**/
Chris@16 27
Chris@16 28 #define BOOST_TTI_DETAIL_TRAIT_ASSERT_NOT_NIL(trait,name,params) \
Chris@16 29 BOOST_PP_ASSERT_MSG(0, "The parameter must be BOOST_PP_NIL") \
Chris@16 30 /**/
Chris@16 31
Chris@16 32 #define BOOST_TTI_DETAIL_TRAIT_CHECK_IS_NIL(trait,name,params) \
Chris@16 33 BOOST_PP_IIF \
Chris@16 34 ( \
Chris@16 35 BOOST_TTI_DETAIL_IS_NIL(params), \
Chris@16 36 BOOST_TTI_DETAIL_TRAIT_HAS_TEMPLATE, \
Chris@16 37 BOOST_TTI_DETAIL_TRAIT_ASSERT_NOT_NIL \
Chris@16 38 ) \
Chris@16 39 (trait,name,params) \
Chris@16 40 /**/
Chris@16 41
Chris@101 42 #define BOOST_TTI_DETAIL_TRAIT_HAS_TEMPLATE_THT(trait,name) \
Chris@16 43 BOOST_MPL_HAS_XXX_TEMPLATE_NAMED_DEF(BOOST_PP_CAT(trait,_detail_mpl), name, false) \
Chris@16 44 template<class BOOST_TTI_DETAIL_TP_T> \
Chris@101 45 struct BOOST_PP_CAT(trait,_tht) : \
Chris@16 46 BOOST_PP_CAT(trait,_detail_mpl)<BOOST_TTI_DETAIL_TP_T> \
Chris@16 47 { \
Chris@16 48 }; \
Chris@16 49 /**/
Chris@16 50
Chris@101 51 #define BOOST_TTI_DETAIL_TRAIT_HAS_TEMPLATE(trait,name,params) \
Chris@101 52 BOOST_TTI_DETAIL_TRAIT_HAS_TEMPLATE_THT(trait,name) \
Chris@101 53 template<class BOOST_TTI_DETAIL_TP_T> \
Chris@101 54 struct trait \
Chris@101 55 { \
Chris@101 56 typedef typename \
Chris@101 57 boost::mpl::eval_if \
Chris@101 58 < \
Chris@101 59 boost::is_class<BOOST_TTI_DETAIL_TP_T>, \
Chris@101 60 BOOST_PP_CAT(trait,_tht)<BOOST_TTI_DETAIL_TP_T>, \
Chris@101 61 boost::mpl::false_ \
Chris@101 62 >::type type; \
Chris@101 63 BOOST_STATIC_CONSTANT(bool,value=type::value); \
Chris@101 64 }; \
Chris@101 65 /**/
Chris@101 66
Chris@16 67 #endif // !BOOST_TTI_DETAIL_TEMPLATE_HPP