Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:41:56

0001 
0002 #ifndef BOOST_MPL_INTEGRAL_C_HPP_INCLUDED
0003 #define BOOST_MPL_INTEGRAL_C_HPP_INCLUDED
0004 
0005 // Copyright Aleksey Gurtovoy 2000-2006
0006 //
0007 // Distributed under the Boost Software License, Version 1.0. 
0008 // (See accompanying file LICENSE_1_0.txt or copy at 
0009 // http://www.boost.org/LICENSE_1_0.txt)
0010 //
0011 // See http://www.boost.org/libs/mpl for documentation.
0012 
0013 // $Id$
0014 // $Date$
0015 // $Revision$
0016 
0017 #include <boost/mpl/integral_c_fwd.hpp>
0018 #include <boost/mpl/aux_/config/ctps.hpp>
0019 #include <boost/mpl/aux_/config/static_constant.hpp>
0020 #include <boost/mpl/aux_/config/workaround.hpp>
0021 
0022 #if BOOST_WORKAROUND(__HP_aCC, <= 53800)
0023 // the type of non-type template arguments may not depend on template arguments
0024 #   define AUX_WRAPPER_PARAMS(N) typename T, long N
0025 #else
0026 #   define AUX_WRAPPER_PARAMS(N) typename T, T N
0027 #endif
0028 
0029 #define AUX_WRAPPER_NAME integral_c
0030 #define AUX_WRAPPER_VALUE_TYPE T
0031 #define AUX_WRAPPER_INST(value) AUX_WRAPPER_NAME< T, value >
0032 #include <boost/mpl/aux_/integral_wrapper.hpp>
0033 
0034 
0035 #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \
0036  && !BOOST_WORKAROUND(BOOST_BORLANDC, <= 0x551)
0037 BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
0038 // 'bool' constant doesn't have 'next'/'prior' members
0039 template< bool C >
0040 struct integral_c<bool, C>
0041 {
0042     BOOST_STATIC_CONSTANT(bool, value = C);
0043     typedef integral_c_tag tag;
0044     typedef integral_c type;
0045     typedef bool value_type;
0046     operator bool() const { return this->value; }
0047 };
0048 BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
0049 #endif
0050 
0051 #endif // BOOST_MPL_INTEGRAL_C_HPP_INCLUDED