File indexing completed on 2025-01-18 09:41:39
0001
0002 #ifndef BOOST_MPL_AUX_VALUE_WKND_HPP_INCLUDED
0003 #define BOOST_MPL_AUX_VALUE_WKND_HPP_INCLUDED
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017 #include <boost/mpl/aux_/static_cast.hpp>
0018 #include <boost/mpl/aux_/config/integral.hpp>
0019 #include <boost/mpl/aux_/config/eti.hpp>
0020 #include <boost/mpl/aux_/config/workaround.hpp>
0021
0022 #if defined(BOOST_MPL_CFG_BCC_INTEGRAL_CONSTANTS) \
0023 || defined(BOOST_MPL_CFG_MSVC_60_ETI_BUG)
0024
0025 # include <boost/mpl/int.hpp>
0026
0027 namespace boost { namespace mpl { namespace aux {
0028 template< typename C_ > struct value_wknd
0029 : C_
0030 {
0031 };
0032
0033 #if defined(BOOST_MPL_CFG_MSVC_60_ETI_BUG)
0034 template<> struct value_wknd<int>
0035 : int_<1>
0036 {
0037 using int_<1>::value;
0038 };
0039 #endif
0040 }}}
0041
0042
0043 #if !defined(BOOST_MPL_CFG_MSVC_60_ETI_BUG)
0044 # define BOOST_MPL_AUX_VALUE_WKND(C) \
0045 ::BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::aux::value_wknd< C > \
0046
0047 # define BOOST_MPL_AUX_MSVC_VALUE_WKND(C) BOOST_MPL_AUX_VALUE_WKND(C)
0048 #else
0049 # define BOOST_MPL_AUX_VALUE_WKND(C) C
0050 # define BOOST_MPL_AUX_MSVC_VALUE_WKND(C) \
0051 ::boost::mpl::aux::value_wknd< C > \
0052
0053 #endif
0054
0055 #else
0056
0057 # define BOOST_MPL_AUX_VALUE_WKND(C) C
0058 # define BOOST_MPL_AUX_MSVC_VALUE_WKND(C) C
0059
0060 #endif
0061
0062 #if BOOST_WORKAROUND(__EDG_VERSION__, <= 238)
0063 # define BOOST_MPL_AUX_NESTED_VALUE_WKND(T, C) \
0064 BOOST_MPL_AUX_STATIC_CAST(T, C::value) \
0065
0066 #else
0067 # define BOOST_MPL_AUX_NESTED_VALUE_WKND(T, C) \
0068 BOOST_MPL_AUX_VALUE_WKND(C)::value \
0069
0070 #endif
0071
0072
0073 namespace boost { namespace mpl { namespace aux {
0074
0075 template< typename T > struct value_type_wknd
0076 {
0077 typedef typename T::value_type type;
0078 };
0079
0080 #if defined(BOOST_MPL_CFG_MSVC_ETI_BUG)
0081 template<> struct value_type_wknd<int>
0082 {
0083 typedef int type;
0084 };
0085 #endif
0086
0087 }}}
0088
0089 #endif