]> git.donarmstrong.com Git - rsem.git/blob - boost/type_traits/detail/type_trait_def.hpp
644c7ac90952f33687be6a315786ef34a5441f2a
[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: 2004-09-02 11:41:37 -0400 (Thu, 02 Sep 2004) $
12 // $Revision: 24874 $
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     typedef result type; \
21     BOOST_MPL_AUX_LAMBDA_SUPPORT(1,trait,(T)) \
22 }; \
23 \
24 BOOST_TT_AUX_TEMPLATE_ARITY_SPEC(1,trait) \
25 /**/
26
27 #define BOOST_TT_AUX_TYPE_TRAIT_SPEC1(trait,spec,result) \
28 template<> struct trait<spec> \
29 { \
30     typedef result type; \
31     BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(1,trait,(spec)) \
32 }; \
33 /**/
34
35 #define BOOST_TT_AUX_TYPE_TRAIT_IMPL_SPEC1(trait,spec,result) \
36 template<> struct trait##_impl<spec> \
37 { \
38     typedef result type; \
39 }; \
40 /**/
41
42 #define BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(param,trait,spec,result) \
43 template< param > struct trait<spec> \
44 { \
45     typedef result type; \
46 }; \
47 /**/
48
49 #define BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2(param1,param2,trait,spec,result) \
50 template< param1, param2 > struct trait<spec> \
51 { \
52     typedef result; \
53 }; \
54 /**/
55
56 #define BOOST_TT_AUX_TYPE_TRAIT_IMPL_PARTIAL_SPEC1_1(param,trait,spec,result) \
57 template< param > struct trait##_impl<spec> \
58 { \
59     typedef result type; \
60 }; \
61 /**/