blob: acb8111ffd7f0275ad2aff8f0c34245e344c9943 [file] [log] [blame]
Jeff Thompsonf7d49942013-08-01 16:47:40 -07001
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
Jeff Thompson2277ce52013-08-01 17:34:11 -070014#include <ndnboost/type_traits/detail/template_arity_spec.hpp>
15#include <ndnboost/mpl/aux_/lambda_support.hpp>
Jeff Thompsonf7d49942013-08-01 16:47:40 -070016
17#define BOOST_TT_AUX_TYPE_TRAIT_DEF1(trait,T,result) \
18template< typename T > struct trait \
19{ \
20public:\
21 typedef result type; \
22 BOOST_MPL_AUX_LAMBDA_SUPPORT(1,trait,(T)) \
23}; \
24\
25BOOST_TT_AUX_TEMPLATE_ARITY_SPEC(1,trait) \
26/**/
27
28#define BOOST_TT_AUX_TYPE_TRAIT_SPEC1(trait,spec,result) \
29template<> struct trait<spec> \
30{ \
31public:\
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) \
38template<> struct trait##_impl<spec> \
39{ \
40public:\
41 typedef result type; \
42}; \
43/**/
44
45#define BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(param,trait,spec,result) \
46template< param > struct trait<spec> \
47{ \
48public:\
49 typedef result type; \
50}; \
51/**/
52
53#define BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2(param1,param2,trait,spec,result) \
54template< param1, param2 > struct trait<spec> \
55{ \
56public:\
57 typedef result; \
58}; \
59/**/
60
61#define BOOST_TT_AUX_TYPE_TRAIT_IMPL_PARTIAL_SPEC1_1(param,trait,spec,result) \
62template< param > struct trait##_impl<spec> \
63{ \
64public:\
65 typedef result type; \
66}; \
67/**/