Mercurial > hg > vamp-build-and-test
comparison DEPENDENCIES/generic/include/boost/tti/detail/dtemplate.hpp @ 16:2665513ce2d3
Add boost headers
author | Chris Cannam |
---|---|
date | Tue, 05 Aug 2014 11:11:38 +0100 |
parents | |
children | c530137014c0 |
comparison
equal
deleted
inserted
replaced
15:663ca0da4350 | 16:2665513ce2d3 |
---|---|
1 | |
2 // (C) Copyright Edward Diener 2011,2012,2013 | |
3 // Use, modification and distribution are subject to the Boost Software License, | |
4 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at | |
5 // http://www.boost.org/LICENSE_1_0.txt). | |
6 | |
7 #if !defined(BOOST_TTI_DETAIL_TEMPLATE_HPP) | |
8 #define BOOST_TTI_DETAIL_TEMPLATE_HPP | |
9 | |
10 #include <boost/config.hpp> | |
11 #include <boost/mpl/has_xxx.hpp> | |
12 #include <boost/preprocessor/cat.hpp> | |
13 #include <boost/preprocessor/debug/assert.hpp> | |
14 #include <boost/preprocessor/facilities/is_empty.hpp> | |
15 | |
16 #define BOOST_TTI_DETAIL_IS_HELPER_BOOST_PP_NIL | |
17 | |
18 #define BOOST_TTI_DETAIL_IS_NIL(param) \ | |
19 BOOST_PP_IS_EMPTY \ | |
20 ( \ | |
21 BOOST_PP_CAT(BOOST_TTI_DETAIL_IS_HELPER_,param) \ | |
22 ) \ | |
23 /**/ | |
24 | |
25 #define BOOST_TTI_DETAIL_TRAIT_ASSERT_NOT_NIL(trait,name,params) \ | |
26 BOOST_PP_ASSERT_MSG(0, "The parameter must be BOOST_PP_NIL") \ | |
27 /**/ | |
28 | |
29 #define BOOST_TTI_DETAIL_TRAIT_CHECK_IS_NIL(trait,name,params) \ | |
30 BOOST_PP_IIF \ | |
31 ( \ | |
32 BOOST_TTI_DETAIL_IS_NIL(params), \ | |
33 BOOST_TTI_DETAIL_TRAIT_HAS_TEMPLATE, \ | |
34 BOOST_TTI_DETAIL_TRAIT_ASSERT_NOT_NIL \ | |
35 ) \ | |
36 (trait,name,params) \ | |
37 /**/ | |
38 | |
39 #define BOOST_TTI_DETAIL_TRAIT_HAS_TEMPLATE(trait,name,params) \ | |
40 BOOST_MPL_HAS_XXX_TEMPLATE_NAMED_DEF(BOOST_PP_CAT(trait,_detail_mpl), name, false) \ | |
41 template<class BOOST_TTI_DETAIL_TP_T> \ | |
42 struct trait : \ | |
43 BOOST_PP_CAT(trait,_detail_mpl)<BOOST_TTI_DETAIL_TP_T> \ | |
44 { \ | |
45 }; \ | |
46 /**/ | |
47 | |
48 #endif // !BOOST_TTI_DETAIL_TEMPLATE_HPP |