[857] | 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: /cvsroot/boost/boost/boost/type_traits/detail/type_trait_def.hpp,v $
|
---|
| 11 | // $Date: 2004/09/02 15:41:27 $
|
---|
| 12 | // $Revision: 1.7 $
|
---|
| 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 | /**/
|
---|