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: 2005-08-25 12:27:28 -0400 (Thu, 25 Aug 2005) $ |
---|
12 | // $Revision: 30670 $ |
---|
13 | |
---|
14 | #include <boost/type_traits/detail/template_arity_spec.hpp> |
---|
15 | #include <boost/type_traits/integral_constant.hpp> |
---|
16 | #include <boost/mpl/aux_/lambda_support.hpp> |
---|
17 | #include <boost/mpl/size_t.hpp> |
---|
18 | |
---|
19 | #include <cstddef> |
---|
20 | |
---|
21 | #if !defined(BOOST_MSVC) || BOOST_MSVC >= 1300 |
---|
22 | # define BOOST_TT_AUX_SIZE_T_BASE(C) ::boost::integral_constant<std::size_t,C> |
---|
23 | # define BOOST_TT_AUX_SIZE_T_TRAIT_VALUE_DECL(C) /**/ |
---|
24 | #else |
---|
25 | # define BOOST_TT_AUX_SIZE_T_BASE(C) ::boost::mpl::size_t<C> |
---|
26 | # define BOOST_TT_AUX_SIZE_T_TRAIT_VALUE_DECL(C) \ |
---|
27 | typedef ::boost::mpl::size_t<C> base_; \ |
---|
28 | using base_::value; \ |
---|
29 | /**/ |
---|
30 | #endif |
---|
31 | |
---|
32 | |
---|
33 | #define BOOST_TT_AUX_SIZE_T_TRAIT_DEF1(trait,T,C) \ |
---|
34 | template< typename T > struct trait \ |
---|
35 | : BOOST_TT_AUX_SIZE_T_BASE(C) \ |
---|
36 | { \ |
---|
37 | BOOST_TT_AUX_SIZE_T_TRAIT_VALUE_DECL(C) \ |
---|
38 | BOOST_MPL_AUX_LAMBDA_SUPPORT(1,trait,(T)) \ |
---|
39 | }; \ |
---|
40 | \ |
---|
41 | BOOST_TT_AUX_TEMPLATE_ARITY_SPEC(1,trait) \ |
---|
42 | /**/ |
---|
43 | |
---|
44 | #define BOOST_TT_AUX_SIZE_T_TRAIT_SPEC1(trait,spec,C) \ |
---|
45 | template<> struct trait<spec> \ |
---|
46 | : BOOST_TT_AUX_SIZE_T_BASE(C) \ |
---|
47 | { \ |
---|
48 | BOOST_TT_AUX_SIZE_T_TRAIT_VALUE_DECL(C) \ |
---|
49 | BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(1,trait,(spec)) \ |
---|
50 | }; \ |
---|
51 | /**/ |
---|
52 | |
---|
53 | #define BOOST_TT_AUX_SIZE_T_TRAIT_PARTIAL_SPEC1_1(param,trait,spec,C) \ |
---|
54 | template< param > struct trait<spec> \ |
---|
55 | : BOOST_TT_AUX_SIZE_T_BASE(C) \ |
---|
56 | { \ |
---|
57 | }; \ |
---|
58 | /**/ |
---|