2 #ifndef BOOST_MPL_INTEGRAL_C_HPP_INCLUDED
3 #define BOOST_MPL_INTEGRAL_C_HPP_INCLUDED
5 // + file: boost/mpl/integral_c.hpp
6 // + last modified: 08/mar/03
8 // Copyright (c) 2000-03
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.
19 // See http://www.boost.org/libs/mpl for documentation.
21 #include "boost/mpl/integral_c_fwd.hpp"
22 #include "boost/mpl/aux_/ice_cast.hpp"
23 #include "boost/mpl/aux_/config/ctps.hpp"
24 #include "boost/mpl/aux_/config/workaround.hpp"
26 #if BOOST_WORKAROUND(__HP_aCC, BOOST_TESTED_AT(53800))
27 // the type of non-type template arguments may not depend on template arguments
28 # define AUX_WRAPPER_PARAMS(N) typename T, long N
30 # define AUX_WRAPPER_PARAMS(N) typename T, T N
33 #define AUX_WRAPPER_NAME integral_c
34 #define AUX_WRAPPER_VALUE_TYPE T
35 #define AUX_WRAPPER_INST(value) AUX_WRAPPER_NAME< T, value >
36 #include "boost/mpl/aux_/integral_wrapper.hpp"
39 #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \
40 && !BOOST_WORKAROUND(__BORLANDC__, <= 0x551)
41 namespace boost { namespace mpl {
42 // 'bool' constant doesn't have 'next'/'prior' members
44 struct integral_c<bool, C>
46 BOOST_STATIC_CONSTANT(bool, value = C);
47 typedef integral_c type;
48 operator bool() const { return this->value; }
53 #endif // BOOST_MPL_INTEGRAL_C_HPP_INCLUDED