Turi Create  4.0
type_trait_def.hpp
1 /* Copyright © 2017 Apple Inc. All rights reserved.
2  *
3  * Use of this source code is governed by a BSD-3-clause license that can
4  * be found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause
5  */
6 
7 // NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION
8 
9 // Copyright Aleksey Gurtovoy 2002-2004
10 //
11 // Distributed under the Boost Software License, Version 1.0.
12 // (See accompanying file LICENSE_1_0.txt or copy at
13 // http://www.boost.org/LICENSE_1_0.txt)
14 
15 // $Source$
16 // $Date$
17 // $Revision$
18 
19 #include <boost/mpl/aux_/lambda_support.hpp>
20 
21 #define BOOST_TT_AUX_TYPE_TRAIT_DEF1(trait,T,result) \
22 template< typename T > struct trait \
23 { \
24 public:\
25  typedef result type; \
26  BOOST_MPL_AUX_LAMBDA_SUPPORT(1,trait,(T)) \
27 }; \
28 /**/
29 
30 #define BOOST_TT_AUX_TYPE_TRAIT_SPEC1(trait,spec,result) \
31 template<> struct trait<spec> \
32 { \
33 public:\
34  typedef result type; \
35  BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(1,trait,(spec)) \
36 }; \
37 /**/
38 
39 #define BOOST_TT_AUX_TYPE_TRAIT_IMPL_SPEC1(trait,spec,result) \
40 template<> struct trait##_impl<spec> \
41 { \
42 public:\
43  typedef result type; \
44 }; \
45 /**/
46 
47 #define BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(param,trait,spec,result) \
48 template< param > struct trait<spec> \
49 { \
50 public:\
51  typedef result type; \
52 }; \
53 /**/
54 
55 #define BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2(param1,param2,trait,spec,result) \
56 template< param1, param2 > struct trait<spec> \
57 { \
58 public:\
59  typedef result; \
60 }; \
61 /**/
62 
63 #define BOOST_TT_AUX_TYPE_TRAIT_IMPL_PARTIAL_SPEC1_1(param,trait,spec,result) \
64 template< param > struct trait##_impl<spec> \
65 { \
66 public:\
67  typedef result type; \
68 }; \
69 /**/