]> git.lyx.org Git - lyx.git/blob - boost/boost/type_traits/detail/size_t_trait_def.hpp
update to boost 1.30.1
[lyx.git] / boost / boost / type_traits / detail / size_t_trait_def.hpp
1 //-----------------------------------------------------------------------------
2 // boost/type_traits/detail/size_t_trait_def.hpp header file
3 // See http://www.boost.org for updates, documentation, and revision history.
4 //-----------------------------------------------------------------------------
5 //
6 // Copyright (c) 2002
7 // Aleksey Gurtovoy
8 //
9 // Permission to use, copy, modify, distribute and sell this software
10 // and its documentation for any purpose is hereby granted without fee, 
11 // provided that the above copyright notice appears in all copies and 
12 // that both the copyright notice and this permission notice appear in 
13 // supporting documentation. No representations are made about the 
14 // suitability of this software for any purpose. It is provided "as is" 
15 // without express or implied warranty.
16
17 // no include guards, the header is intended for multiple inclusion!
18
19 #include "boost/type_traits/detail/template_arity_spec.hpp"
20 #include "boost/mpl/size_t.hpp"
21 #include "boost/mpl/aux_/lambda_support.hpp"
22
23 #include <cstddef>
24
25 #if !defined(BOOST_MSVC) || BOOST_MSVC > 1200
26 #   define BOOST_TT_AUX_SIZE_T_TRAIT_VALUE_DECL(C) /**/
27 #else
28 #   define BOOST_TT_AUX_SIZE_T_TRAIT_VALUE_DECL(C) \
29     typedef mpl::size_t< C > base_; \
30     using base_::value; \
31     /**/
32 #endif
33
34
35 #define BOOST_TT_AUX_SIZE_T_TRAIT_DEF1(trait,T,C) \
36 template< typename T > struct trait \
37     : mpl::size_t< C > \
38 { \
39     BOOST_TT_AUX_SIZE_T_TRAIT_VALUE_DECL(C) \
40     BOOST_MPL_AUX_LAMBDA_SUPPORT(1,trait,(T)) \
41 }; \
42 \
43 BOOST_TT_AUX_TEMPLATE_ARITY_SPEC(1,trait) \
44 /**/
45
46 #define BOOST_TT_AUX_SIZE_T_TRAIT_SPEC1(trait,spec,C) \
47 template<> struct trait<spec> \
48     : mpl::size_t< C > \
49 { \
50     BOOST_TT_AUX_SIZE_T_TRAIT_VALUE_DECL(C) \
51     BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(1,trait,(spec)) \
52 }; \
53 /**/
54
55 #define BOOST_TT_AUX_SIZE_T_TRAIT_PARTIAL_SPEC1_1(param,trait,spec,C) \
56 template< param > struct trait<spec> \
57     : mpl::size_t< C > \
58 { \
59 }; \
60 /**/