2 #ifndef BOOST_MPL_AUX_VALUE_WKND_HPP_INCLUDED
\r
3 #define BOOST_MPL_AUX_VALUE_WKND_HPP_INCLUDED
\r
5 // Copyright Aleksey Gurtovoy 2000-2004
\r
7 // Distributed under the Boost Software License, Version 1.0.
\r
8 // (See accompanying file LICENSE_1_0.txt or copy at
\r
9 // http://www.boost.org/LICENSE_1_0.txt)
\r
11 // See http://www.boost.org/libs/mpl for documentation.
\r
13 // $Id: value_wknd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
\r
14 // $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
\r
15 // $Revision: 49267 $
\r
17 #include <boost/mpl/aux_/static_cast.hpp>
\r
18 #include <boost/mpl/aux_/config/integral.hpp>
\r
19 #include <boost/mpl/aux_/config/eti.hpp>
\r
20 #include <boost/mpl/aux_/config/workaround.hpp>
\r
22 #if defined(BOOST_MPL_CFG_BCC_INTEGRAL_CONSTANTS) \
\r
23 || defined(BOOST_MPL_CFG_MSVC_60_ETI_BUG)
\r
25 # include <boost/mpl/int.hpp>
\r
27 namespace boost { namespace mpl { namespace aux {
\r
28 template< typename C_ > struct value_wknd
\r
33 #if defined(BOOST_MPL_CFG_MSVC_60_ETI_BUG)
\r
34 template<> struct value_wknd<int>
\r
37 using int_<1>::value;
\r
43 #if !defined(BOOST_MPL_CFG_MSVC_60_ETI_BUG)
\r
44 # define BOOST_MPL_AUX_VALUE_WKND(C) \
\r
45 ::BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::aux::value_wknd< C > \
\r
47 # define BOOST_MPL_AUX_MSVC_VALUE_WKND(C) BOOST_MPL_AUX_VALUE_WKND(C)
\r
49 # define BOOST_MPL_AUX_VALUE_WKND(C) C
\r
50 # define BOOST_MPL_AUX_MSVC_VALUE_WKND(C) \
\r
51 ::boost::mpl::aux::value_wknd< C > \
\r
55 #else // BOOST_MPL_CFG_BCC_INTEGRAL_CONSTANTS
\r
57 # define BOOST_MPL_AUX_VALUE_WKND(C) C
\r
58 # define BOOST_MPL_AUX_MSVC_VALUE_WKND(C) C
\r
62 #if BOOST_WORKAROUND(__EDG_VERSION__, <= 238)
\r
63 # define BOOST_MPL_AUX_NESTED_VALUE_WKND(T, C) \
\r
64 BOOST_MPL_AUX_STATIC_CAST(T, C::value) \
\r
67 # define BOOST_MPL_AUX_NESTED_VALUE_WKND(T, C) \
\r
68 BOOST_MPL_AUX_VALUE_WKND(C)::value \
\r
73 namespace boost { namespace mpl { namespace aux {
\r
75 template< typename T > struct value_type_wknd
\r
77 typedef typename T::value_type type;
\r
80 #if defined(BOOST_MPL_CFG_MSVC_ETI_BUG)
\r
81 template<> struct value_type_wknd<int>
\r
89 #endif // BOOST_MPL_AUX_VALUE_WKND_HPP_INCLUDED
\r