]> git.donarmstrong.com Git - rsem.git/blob - boost/type_traits/detail/type_trait_def.hpp
224f84887ded14ec5a2389a841d567646b84a513
[rsem.git] / boost / type_traits / detail / type_trait_def.hpp
1
2 // NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION
3
4 // Copyright Aleksey Gurtovoy 2002-2004
5 //
6 // Distributed under the Boost Software License, Version 1.0. 
7 // (See accompanying file LICENSE_1_0.txt or copy at 
8 // http://www.boost.org/LICENSE_1_0.txt)
9
10 // $Source$
11 // $Date: 2011-04-25 05:26:48 -0700 (Mon, 25 Apr 2011) $
12 // $Revision: 71481 $
13
14 #include <boost/type_traits/detail/template_arity_spec.hpp>
15 #include <boost/mpl/aux_/lambda_support.hpp>
16
17 #define BOOST_TT_AUX_TYPE_TRAIT_DEF1(trait,T,result) \
18 template< typename T > struct trait \
19 { \
20 public:\
21     typedef result type; \
22     BOOST_MPL_AUX_LAMBDA_SUPPORT(1,trait,(T)) \
23 }; \
24 \
25 BOOST_TT_AUX_TEMPLATE_ARITY_SPEC(1,trait) \
26 /**/
27
28 #define BOOST_TT_AUX_TYPE_TRAIT_SPEC1(trait,spec,result) \
29 template<> struct trait<spec> \
30 { \
31 public:\
32     typedef result type; \
33     BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(1,trait,(spec)) \
34 }; \
35 /**/
36
37 #define BOOST_TT_AUX_TYPE_TRAIT_IMPL_SPEC1(trait,spec,result) \
38 template<> struct trait##_impl<spec> \
39 { \
40 public:\
41     typedef result type; \
42 }; \
43 /**/
44
45 #define BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(param,trait,spec,result) \
46 template< param > struct trait<spec> \
47 { \
48 public:\
49     typedef result type; \
50 }; \
51 /**/
52
53 #define BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2(param1,param2,trait,spec,result) \
54 template< param1, param2 > struct trait<spec> \
55 { \
56 public:\
57     typedef result; \
58 }; \
59 /**/
60
61 #define BOOST_TT_AUX_TYPE_TRAIT_IMPL_PARTIAL_SPEC1_1(param,trait,spec,result) \
62 template< param > struct trait##_impl<spec> \
63 { \
64 public:\
65     typedef result type; \
66 }; \
67 /**/