]> git.lyx.org Git - lyx.git/blob - boost/boost/mpl/integral_c.hpp
update boost to pre-1.30.0
[lyx.git] / boost / boost / mpl / integral_c.hpp
1
2 #ifndef BOOST_MPL_INTEGRAL_C_HPP_INCLUDED
3 #define BOOST_MPL_INTEGRAL_C_HPP_INCLUDED
4
5 // + file: boost/mpl/integral_c.hpp
6 // + last modified: 25/feb/03
7
8 // Copyright (c) 2000-03
9 // Aleksey Gurtovoy
10 //
11 // Permission to use, copy, modify, distribute and sell this software
12 // and its documentation for any purpose is hereby granted without fee, 
13 // provided that the above copyright notice appears in all copies and 
14 // that both the copyright notice and this permission notice appear in 
15 // supporting documentation. No representations are made about the 
16 // suitability of this software for any purpose. It is provided "as is" 
17 // without express or implied warranty.
18 //
19 // See http://www.boost.org/libs/mpl for documentation.
20
21 #include "boost/mpl/aux_/ice_cast.hpp"
22 #include "boost/mpl/aux_/config/ctps.hpp"
23 #include "boost/mpl/aux_/config/workaround.hpp"
24
25 #if BOOST_WORKAROUND(__HP_aCC, BOOST_TESTED_AT(53800))
26 // the type of non-type template arguments may not depend on template arguments
27 #   define AUX_WRAPPER_PARAMS(N) typename T, long N
28 #else
29 #   define AUX_WRAPPER_PARAMS(N) typename T, T N
30 #endif
31
32 #define AUX_WRAPPER_NAME integral_c
33 #define AUX_WRAPPER_VALUE_TYPE T
34 #define AUX_WRAPPER_INST(value) AUX_WRAPPER_NAME< T, value >
35 #include "boost/mpl/aux_/integral_wrapper.hpp"
36
37
38 #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \
39  && !BOOST_WORKAROUND(__BORLANDC__, <= 0x551)
40 namespace boost { namespace mpl {
41 // 'bool' constant doesn't have 'next'/'prior' members
42 template< bool C >
43 struct integral_c<bool, C>
44 {
45     BOOST_STATIC_CONSTANT(bool, value = C);
46     typedef integral_c type;
47     operator bool() const { return this->value; }
48 };
49 }}
50 #endif
51
52 #endif // BOOST_MPL_INTEGRAL_C_HPP_INCLUDED