Chris@16: Chris@16: #ifndef BOOST_MPL_INTEGRAL_C_HPP_INCLUDED Chris@16: #define BOOST_MPL_INTEGRAL_C_HPP_INCLUDED Chris@16: Chris@16: // Copyright Aleksey Gurtovoy 2000-2006 Chris@16: // Chris@16: // Distributed under the Boost Software License, Version 1.0. Chris@16: // (See accompanying file LICENSE_1_0.txt or copy at Chris@16: // http://www.boost.org/LICENSE_1_0.txt) Chris@16: // Chris@16: // See http://www.boost.org/libs/mpl for documentation. Chris@16: Chris@101: // $Id$ Chris@101: // $Date$ Chris@101: // $Revision$ Chris@16: Chris@16: #include Chris@16: #include Chris@16: #include Chris@16: #include Chris@16: Chris@16: #if BOOST_WORKAROUND(__HP_aCC, <= 53800) Chris@16: // the type of non-type template arguments may not depend on template arguments Chris@16: # define AUX_WRAPPER_PARAMS(N) typename T, long N Chris@16: #else Chris@16: # define AUX_WRAPPER_PARAMS(N) typename T, T N Chris@16: #endif Chris@16: Chris@16: #define AUX_WRAPPER_NAME integral_c Chris@16: #define AUX_WRAPPER_VALUE_TYPE T Chris@16: #define AUX_WRAPPER_INST(value) AUX_WRAPPER_NAME< T, value > Chris@16: #include Chris@16: Chris@16: Chris@16: #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ Chris@16: && !BOOST_WORKAROUND(__BORLANDC__, <= 0x551) Chris@16: BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN Chris@16: // 'bool' constant doesn't have 'next'/'prior' members Chris@16: template< bool C > Chris@16: struct integral_c Chris@16: { Chris@16: BOOST_STATIC_CONSTANT(bool, value = C); Chris@16: typedef integral_c_tag tag; Chris@16: typedef integral_c type; Chris@16: typedef bool value_type; Chris@16: operator bool() const { return this->value; } Chris@16: }; Chris@16: BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE Chris@16: #endif Chris@16: Chris@16: #endif // BOOST_MPL_INTEGRAL_C_HPP_INCLUDED