mirror of
https://github.com/boostorg/mpl.git
synced 2025-08-02 14:24:30 +02:00
MPL: Remove obsolete MSVC version checks.
[SVN r85956]
This commit is contained in:
@@ -22,7 +22,6 @@
|
|||||||
# include <boost/mpl/aux_/arity.hpp>
|
# include <boost/mpl/aux_/arity.hpp>
|
||||||
# include <boost/mpl/aux_/has_apply.hpp>
|
# include <boost/mpl/aux_/has_apply.hpp>
|
||||||
# include <boost/mpl/aux_/na.hpp>
|
# include <boost/mpl/aux_/na.hpp>
|
||||||
# include <boost/mpl/aux_/msvc_never_true.hpp>
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <boost/mpl/aux_/config/use_preprocessed.hpp>
|
#include <boost/mpl/aux_/config/use_preprocessed.hpp>
|
||||||
|
@@ -19,9 +19,7 @@
|
|||||||
|
|
||||||
#if !defined(BOOST_MPL_CFG_NO_DEPENDENT_ARRAY_TYPES) \
|
#if !defined(BOOST_MPL_CFG_NO_DEPENDENT_ARRAY_TYPES) \
|
||||||
&& !defined(BOOST_MPL_PREPROCESSING_MODE) \
|
&& !defined(BOOST_MPL_PREPROCESSING_MODE) \
|
||||||
&& ( BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) \
|
&& BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610))
|
||||||
|| BOOST_WORKAROUND(BOOST_MSVC, <= 1300) \
|
|
||||||
)
|
|
||||||
|
|
||||||
# define BOOST_MPL_CFG_NO_DEPENDENT_ARRAY_TYPES
|
# define BOOST_MPL_CFG_NO_DEPENDENT_ARRAY_TYPES
|
||||||
|
|
||||||
|
@@ -20,9 +20,7 @@
|
|||||||
|
|
||||||
#if !defined(BOOST_MPL_CFG_NO_BIND_TEMPLATE) \
|
#if !defined(BOOST_MPL_CFG_NO_BIND_TEMPLATE) \
|
||||||
&& !defined(BOOST_MPL_PREPROCESSING_MODE) \
|
&& !defined(BOOST_MPL_PREPROCESSING_MODE) \
|
||||||
&& ( BOOST_WORKAROUND(BOOST_MSVC, <= 1300) \
|
&& BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610))
|
||||||
|| BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) \
|
|
||||||
)
|
|
||||||
|
|
||||||
# define BOOST_MPL_CFG_NO_BIND_TEMPLATE
|
# define BOOST_MPL_CFG_NO_BIND_TEMPLATE
|
||||||
|
|
||||||
|
@@ -21,7 +21,6 @@
|
|||||||
#if !defined(BOOST_MPL_CFG_NO_HAS_APPLY) \
|
#if !defined(BOOST_MPL_CFG_NO_HAS_APPLY) \
|
||||||
&& ( defined(BOOST_MPL_CFG_NO_HAS_XXX) \
|
&& ( defined(BOOST_MPL_CFG_NO_HAS_XXX) \
|
||||||
|| BOOST_WORKAROUND(__EDG_VERSION__, < 300) \
|
|| BOOST_WORKAROUND(__EDG_VERSION__, < 300) \
|
||||||
|| BOOST_WORKAROUND(BOOST_MSVC, <= 1300) \
|
|
||||||
|| BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3202)) \
|
|| BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3202)) \
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@@ -27,9 +27,7 @@
|
|||||||
|
|
||||||
#if !defined(BOOST_MPL_CFG_NO_NESTED_VALUE_ARITHMETIC) \
|
#if !defined(BOOST_MPL_CFG_NO_NESTED_VALUE_ARITHMETIC) \
|
||||||
&& !defined(BOOST_MPL_PREPROCESSING_MODE) \
|
&& !defined(BOOST_MPL_PREPROCESSING_MODE) \
|
||||||
&& ( BOOST_WORKAROUND(BOOST_MSVC, <= 1300) \
|
&& BOOST_WORKAROUND(__EDG_VERSION__, <= 238)
|
||||||
|| BOOST_WORKAROUND(__EDG_VERSION__, <= 238) \
|
|
||||||
)
|
|
||||||
|
|
||||||
# define BOOST_MPL_CFG_NO_NESTED_VALUE_ARITHMETIC
|
# define BOOST_MPL_CFG_NO_NESTED_VALUE_ARITHMETIC
|
||||||
|
|
||||||
|
@@ -14,13 +14,7 @@
|
|||||||
// $Date$
|
// $Date$
|
||||||
// $Revision$
|
// $Revision$
|
||||||
|
|
||||||
#include <boost/mpl/aux_/config/msvc.hpp>
|
// Obsolete. Remove.
|
||||||
#include <boost/mpl/aux_/config/workaround.hpp>
|
#define BOOST_MSVC_TYPENAME typename
|
||||||
|
|
||||||
#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
|
|
||||||
# define BOOST_MSVC_TYPENAME
|
|
||||||
#else
|
|
||||||
# define BOOST_MSVC_TYPENAME typename
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif // BOOST_MPL_AUX_CONFIG_MSVC_TYPENAME_HPP_INCLUDED
|
#endif // BOOST_MPL_AUX_CONFIG_MSVC_TYPENAME_HPP_INCLUDED
|
||||||
|
@@ -1,41 +0,0 @@
|
|||||||
|
|
||||||
#ifndef BOOST_MPL_AUX_CONFIG_NTTP_HPP_INCLUDED
|
|
||||||
#define BOOST_MPL_AUX_CONFIG_NTTP_HPP_INCLUDED
|
|
||||||
|
|
||||||
// Copyright Aleksey Gurtovoy 2001-2004
|
|
||||||
//
|
|
||||||
// Distributed under the Boost Software License, Version 1.0.
|
|
||||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
|
||||||
// http://www.boost.org/LICENSE_1_0.txt)
|
|
||||||
//
|
|
||||||
// See http://www.boost.org/libs/mpl for documentation.
|
|
||||||
|
|
||||||
// $Id$
|
|
||||||
// $Date$
|
|
||||||
// $Revision$
|
|
||||||
|
|
||||||
#include <boost/mpl/aux_/config/msvc.hpp>
|
|
||||||
#include <boost/mpl/aux_/config/workaround.hpp>
|
|
||||||
|
|
||||||
// MSVC 6.5 ICE-s on the code as simple as this (see "aux_/nttp_decl.hpp"
|
|
||||||
// for a workaround):
|
|
||||||
//
|
|
||||||
// namespace std {
|
|
||||||
// template< typename Char > struct string;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// void foo(std::string<char>);
|
|
||||||
//
|
|
||||||
// namespace boost { namespace mpl {
|
|
||||||
// template< int > struct arg;
|
|
||||||
// }}
|
|
||||||
|
|
||||||
#if !defined(BOOST_MPL_CFG_NTTP_BUG) \
|
|
||||||
&& !defined(BOOST_MPL_PREPROCESSING_MODE) \
|
|
||||||
&& BOOST_WORKAROUND(BOOST_MSVC, < 1300)
|
|
||||||
|
|
||||||
# define BOOST_MPL_CFG_NTTP_BUG
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif // BOOST_MPL_AUX_CONFIG_NTTP_HPP_INCLUDED
|
|
@@ -19,8 +19,7 @@
|
|||||||
#include <boost/mpl/aux_/config/workaround.hpp>
|
#include <boost/mpl/aux_/config/workaround.hpp>
|
||||||
|
|
||||||
#if !defined(BOOST_MPL_CFG_USE_OPERATORS_OVERLOADING) \
|
#if !defined(BOOST_MPL_CFG_USE_OPERATORS_OVERLOADING) \
|
||||||
&& ( BOOST_WORKAROUND(BOOST_MSVC, <= 1300) \
|
&& ( BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) \
|
||||||
|| BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) \
|
|
||||||
|| BOOST_WORKAROUND(__EDG_VERSION__, <= 245) \
|
|| BOOST_WORKAROUND(__EDG_VERSION__, <= 245) \
|
||||||
|| BOOST_WORKAROUND(BOOST_MPL_CFG_GCC, <= 0x0295) \
|
|| BOOST_WORKAROUND(BOOST_MPL_CFG_GCC, <= 0x0295) \
|
||||||
|| BOOST_WORKAROUND(__IBMCPP__, BOOST_TESTED_AT(600)) \
|
|| BOOST_WORKAROUND(__IBMCPP__, BOOST_TESTED_AT(600)) \
|
||||||
|
@@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
#if !defined(BOOST_MPL_AUX_PP_COUNTER)
|
#if !defined(BOOST_MPL_AUX_PP_COUNTER)
|
||||||
# include <boost/mpl/aux_/config/msvc.hpp>
|
# include <boost/mpl/aux_/config/msvc.hpp>
|
||||||
# if BOOST_WORKAROUND(BOOST_MSVC, >= 1300)
|
# ifdef BOOST_MSVC
|
||||||
# define BOOST_MPL_AUX_PP_COUNTER() __COUNTER__
|
# define BOOST_MPL_AUX_PP_COUNTER() __COUNTER__
|
||||||
# else
|
# else
|
||||||
# define BOOST_MPL_AUX_PP_COUNTER() __LINE__
|
# define BOOST_MPL_AUX_PP_COUNTER() __LINE__
|
||||||
|
@@ -20,11 +20,6 @@
|
|||||||
|
|
||||||
#if BOOST_WORKAROUND(__EDG_VERSION__, <= 244) && !defined(BOOST_INTEL_CXX_VERSION)
|
#if BOOST_WORKAROUND(__EDG_VERSION__, <= 244) && !defined(BOOST_INTEL_CXX_VERSION)
|
||||||
# include <boost/mpl/has_xxx.hpp>
|
# include <boost/mpl/has_xxx.hpp>
|
||||||
#elif BOOST_WORKAROUND(BOOST_MSVC, < 1300)
|
|
||||||
# include <boost/mpl/has_xxx.hpp>
|
|
||||||
# include <boost/mpl/if.hpp>
|
|
||||||
# include <boost/mpl/bool.hpp>
|
|
||||||
# include <boost/mpl/aux_/msvc_is_class.hpp>
|
|
||||||
#elif BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610))
|
#elif BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610))
|
||||||
# include <boost/mpl/if.hpp>
|
# include <boost/mpl/if.hpp>
|
||||||
# include <boost/mpl/bool.hpp>
|
# include <boost/mpl/bool.hpp>
|
||||||
@@ -43,20 +38,6 @@ namespace boost { namespace mpl { namespace aux {
|
|||||||
|
|
||||||
BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(has_rebind, rebind, false)
|
BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(has_rebind, rebind, false)
|
||||||
|
|
||||||
#elif BOOST_WORKAROUND(BOOST_MSVC, < 1300)
|
|
||||||
|
|
||||||
BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(has_rebind_impl, rebind, false)
|
|
||||||
|
|
||||||
template< typename T >
|
|
||||||
struct has_rebind
|
|
||||||
: if_<
|
|
||||||
msvc_is_class<T>
|
|
||||||
, has_rebind_impl<T>
|
|
||||||
, bool_<false>
|
|
||||||
>::type
|
|
||||||
{
|
|
||||||
};
|
|
||||||
|
|
||||||
#else // the rest
|
#else // the rest
|
||||||
|
|
||||||
template< typename T > struct has_rebind_tag {};
|
template< typename T > struct has_rebind_tag {};
|
||||||
|
@@ -122,7 +122,7 @@ template< BOOST_MPL_PP_PARAMS(i,typename T) > \
|
|||||||
, name< BOOST_MPL_PP_ENUM(i,::boost::mpl::na) >* \
|
, name< BOOST_MPL_PP_ENUM(i,::boost::mpl::na) >* \
|
||||||
); \
|
); \
|
||||||
/**/
|
/**/
|
||||||
#elif !BOOST_WORKAROUND(BOOST_MSVC, < 1300)
|
#else
|
||||||
# define BOOST_MPL_AUX_LAMBDA_SUPPORT_HAS_REBIND(i, name, params) \
|
# define BOOST_MPL_AUX_LAMBDA_SUPPORT_HAS_REBIND(i, name, params) \
|
||||||
template< BOOST_MPL_PP_PARAMS(i,typename T) > \
|
template< BOOST_MPL_PP_PARAMS(i,typename T) > \
|
||||||
::boost::mpl::aux::yes_tag operator|( \
|
::boost::mpl::aux::yes_tag operator|( \
|
||||||
@@ -130,8 +130,6 @@ template< BOOST_MPL_PP_PARAMS(i,typename T) > \
|
|||||||
, ::boost::mpl::aux::has_rebind_tag< name<BOOST_MPL_PP_PARAMS(i,T)> >* \
|
, ::boost::mpl::aux::has_rebind_tag< name<BOOST_MPL_PP_PARAMS(i,T)> >* \
|
||||||
); \
|
); \
|
||||||
/**/
|
/**/
|
||||||
#else
|
|
||||||
# define BOOST_MPL_AUX_LAMBDA_SUPPORT_HAS_REBIND(i, name, params) /**/
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
# if !defined(__BORLANDC__)
|
# if !defined(__BORLANDC__)
|
||||||
|
@@ -103,14 +103,6 @@ template<> struct BOOST_PP_CAT(AUX778076_OP_NAME,impl)<AUX778076_OP_VALUE2>
|
|||||||
>::template result_< AUX778076_SHIFTED_PARAMS(T,1),BOOST_PP_CAT(AUX778076_OP_VALUE2,_) >
|
>::template result_< AUX778076_SHIFTED_PARAMS(T,1),BOOST_PP_CAT(AUX778076_OP_VALUE2,_) >
|
||||||
{
|
{
|
||||||
};
|
};
|
||||||
|
|
||||||
#if BOOST_WORKAROUND(BOOST_MSVC, == 1300)
|
|
||||||
template<> struct result_<AUX778076_SPEC_PARAMS(BOOST_PP_CAT(AUX778076_OP_VALUE2,_))>
|
|
||||||
: BOOST_PP_CAT(AUX778076_OP_VALUE2,_)
|
|
||||||
{
|
|
||||||
};
|
|
||||||
};
|
|
||||||
#else
|
|
||||||
};
|
};
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
@@ -119,7 +111,6 @@ struct BOOST_PP_CAT(AUX778076_OP_NAME,impl)<AUX778076_OP_VALUE2>
|
|||||||
: BOOST_PP_CAT(AUX778076_OP_VALUE2,_)
|
: BOOST_PP_CAT(AUX778076_OP_VALUE2,_)
|
||||||
{
|
{
|
||||||
};
|
};
|
||||||
#endif // BOOST_MSVC == 1300
|
|
||||||
|
|
||||||
#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
|
#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
|
||||||
|
|
||||||
|
@@ -1,68 +0,0 @@
|
|||||||
|
|
||||||
// Copyright Aleksey Gurtovoy 2000-2004
|
|
||||||
//
|
|
||||||
// Distributed under the Boost Software License, Version 1.0.
|
|
||||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
|
||||||
// http://www.boost.org/LICENSE_1_0.txt)
|
|
||||||
//
|
|
||||||
// See http://www.boost.org/libs/mpl for documentation.
|
|
||||||
|
|
||||||
// $Id$
|
|
||||||
// $Date$
|
|
||||||
// $Revision$
|
|
||||||
|
|
||||||
// NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION!
|
|
||||||
|
|
||||||
#include <boost/mpl/aux_/preprocessor/params.hpp>
|
|
||||||
|
|
||||||
// local macros, #undef-ined at the end of the header
|
|
||||||
#define AUX778076_DTW_PARAMS(param) \
|
|
||||||
BOOST_MPL_PP_PARAMS(AUX778076_MSVC_DTW_ARITY, param) \
|
|
||||||
/**/
|
|
||||||
|
|
||||||
#define AUX778076_DTW_ORIGINAL_NAME \
|
|
||||||
AUX778076_MSVC_DTW_ORIGINAL_NAME \
|
|
||||||
/**/
|
|
||||||
|
|
||||||
// warning: not a well-formed C++
|
|
||||||
// workaround for MSVC 6.5's "dependent template typedef bug"
|
|
||||||
|
|
||||||
template< typename F>
|
|
||||||
struct AUX778076_MSVC_DTW_NAME
|
|
||||||
{
|
|
||||||
template< bool > struct f_ : F {};
|
|
||||||
template<> struct f_<true>
|
|
||||||
{
|
|
||||||
#if AUX778076_MSVC_DTW_ARITY > 0
|
|
||||||
template< AUX778076_DTW_PARAMS(typename P) > struct AUX778076_DTW_ORIGINAL_NAME
|
|
||||||
{
|
|
||||||
typedef int type;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
template< AUX778076_DTW_PARAMS(typename T) > struct result_
|
|
||||||
: f_< aux::msvc_never_true<F>::value >
|
|
||||||
::template AUX778076_DTW_ORIGINAL_NAME< AUX778076_DTW_PARAMS(T) >
|
|
||||||
{
|
|
||||||
};
|
|
||||||
#else
|
|
||||||
template< typename P = int > struct AUX778076_DTW_ORIGINAL_NAME
|
|
||||||
{
|
|
||||||
typedef int type;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
template< typename T = int > struct result_
|
|
||||||
: f_< aux::msvc_never_true<F>::value >
|
|
||||||
::template AUX778076_DTW_ORIGINAL_NAME<>
|
|
||||||
{
|
|
||||||
};
|
|
||||||
#endif
|
|
||||||
};
|
|
||||||
|
|
||||||
#undef AUX778076_DTW_ORIGINAL_NAME
|
|
||||||
#undef AUX778076_DTW_PARAMS
|
|
||||||
|
|
||||||
#undef AUX778076_MSVC_DTW_NAME
|
|
||||||
#undef AUX778076_MSVC_DTW_ORIGINAL_NAME
|
|
||||||
#undef AUX778076_MSVC_DTW_ARITY
|
|
@@ -1,34 +0,0 @@
|
|||||||
|
|
||||||
#ifndef BOOST_MPL_AUX_MSVC_NEVER_TRUE_HPP_INCLUDED
|
|
||||||
#define BOOST_MPL_AUX_MSVC_NEVER_TRUE_HPP_INCLUDED
|
|
||||||
|
|
||||||
// Copyright Aleksey Gurtovoy 2000-2004
|
|
||||||
//
|
|
||||||
// Distributed under the Boost Software License, Version 1.0.
|
|
||||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
|
||||||
// http://www.boost.org/LICENSE_1_0.txt)
|
|
||||||
//
|
|
||||||
// See http://www.boost.org/libs/mpl for documentation.
|
|
||||||
|
|
||||||
// $Id$
|
|
||||||
// $Date$
|
|
||||||
// $Revision$
|
|
||||||
|
|
||||||
#include <boost/mpl/aux_/config/msvc.hpp>
|
|
||||||
#include <boost/mpl/aux_/config/workaround.hpp>
|
|
||||||
|
|
||||||
#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
|
|
||||||
|
|
||||||
namespace boost { namespace mpl { namespace aux {
|
|
||||||
|
|
||||||
template< typename T >
|
|
||||||
struct msvc_never_true
|
|
||||||
{
|
|
||||||
enum { value = false };
|
|
||||||
};
|
|
||||||
|
|
||||||
}}}
|
|
||||||
|
|
||||||
#endif // BOOST_MSVC
|
|
||||||
|
|
||||||
#endif // BOOST_MPL_AUX_MSVC_NEVER_TRUE_HPP_INCLUDED
|
|
@@ -25,36 +25,24 @@ template< typename T >
|
|||||||
struct is_na
|
struct is_na
|
||||||
: false_
|
: false_
|
||||||
{
|
{
|
||||||
#if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
|
|
||||||
using false_::value;
|
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
struct is_na<na>
|
struct is_na<na>
|
||||||
: true_
|
: true_
|
||||||
{
|
{
|
||||||
#if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
|
|
||||||
using true_::value;
|
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
||||||
template< typename T >
|
template< typename T >
|
||||||
struct is_not_na
|
struct is_not_na
|
||||||
: true_
|
: true_
|
||||||
{
|
{
|
||||||
#if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
|
|
||||||
using true_::value;
|
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
struct is_not_na<na>
|
struct is_not_na<na>
|
||||||
: false_
|
: false_
|
||||||
{
|
{
|
||||||
#if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
|
|
||||||
using false_::value;
|
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
|
#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
|
||||||
|
@@ -16,20 +16,7 @@
|
|||||||
|
|
||||||
#include <boost/mpl/aux_/config/nttp.hpp>
|
#include <boost/mpl/aux_/config/nttp.hpp>
|
||||||
|
|
||||||
#if defined(BOOST_MPL_CFG_NTTP_BUG)
|
// Obsolete. Remove.
|
||||||
|
|
||||||
typedef bool _mpl_nttp_bool;
|
|
||||||
typedef int _mpl_nttp_int;
|
|
||||||
typedef unsigned _mpl_nttp_unsigned;
|
|
||||||
typedef long _mpl_nttp_long;
|
|
||||||
|
|
||||||
# include <boost/preprocessor/cat.hpp>
|
|
||||||
# define BOOST_MPL_AUX_NTTP_DECL(T, x) BOOST_PP_CAT(_mpl_nttp_,T) x /**/
|
|
||||||
|
|
||||||
#else
|
|
||||||
|
|
||||||
# define BOOST_MPL_AUX_NTTP_DECL(T, x) T x /**/
|
# define BOOST_MPL_AUX_NTTP_DECL(T, x) T x /**/
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif // BOOST_MPL_AUX_NTTP_DECL_HPP_INCLUDED
|
#endif // BOOST_MPL_AUX_NTTP_DECL_HPP_INCLUDED
|
||||||
|
@@ -26,15 +26,7 @@ namespace boost { namespace mpl {
|
|||||||
template< typename Tag >
|
template< typename Tag >
|
||||||
struct pop_front_impl
|
struct pop_front_impl
|
||||||
{
|
{
|
||||||
template< typename Sequence > struct apply
|
template< typename Sequence > struct apply;
|
||||||
// conservatively placed, but maybe should go outside surrounding
|
|
||||||
// braces.
|
|
||||||
#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
|
|
||||||
{
|
|
||||||
typedef int type;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(1, pop_front_impl)
|
BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(1, pop_front_impl)
|
||||||
|
@@ -65,12 +65,7 @@ template<> struct advance_impl<aux::r_iter_tag>
|
|||||||
template< typename Iter, typename Dist > struct apply
|
template< typename Iter, typename Dist > struct apply
|
||||||
{
|
{
|
||||||
typedef typename deref<Iter>::type n_;
|
typedef typename deref<Iter>::type n_;
|
||||||
#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
|
|
||||||
typedef typename plus_impl<integral_c_tag,integral_c_tag>
|
|
||||||
::template apply<n_,Dist>::type m_;
|
|
||||||
#else
|
|
||||||
typedef typename plus<n_,Dist>::type m_;
|
typedef typename plus<n_,Dist>::type m_;
|
||||||
#endif
|
|
||||||
// agurt, 10/nov/04: to be generic, the code have to do something along
|
// agurt, 10/nov/04: to be generic, the code have to do something along
|
||||||
// the lines below...
|
// the lines below...
|
||||||
//
|
//
|
||||||
|
@@ -38,12 +38,7 @@ template<> struct yes_no_tag<true>
|
|||||||
|
|
||||||
template< BOOST_MPL_AUX_NTTP_DECL(long, n) > struct weighted_tag
|
template< BOOST_MPL_AUX_NTTP_DECL(long, n) > struct weighted_tag
|
||||||
{
|
{
|
||||||
#if !BOOST_WORKAROUND(BOOST_MSVC, < 1300)
|
|
||||||
typedef char (&type)[n];
|
typedef char (&type)[n];
|
||||||
#else
|
|
||||||
char buf[n];
|
|
||||||
typedef weighted_tag type;
|
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#if defined(BOOST_MPL_CFG_NO_DEPENDENT_ARRAY_TYPES)
|
#if defined(BOOST_MPL_CFG_NO_DEPENDENT_ARRAY_TYPES)
|
||||||
|
@@ -34,18 +34,12 @@ template< typename T >
|
|||||||
struct is_empty_base
|
struct is_empty_base
|
||||||
: false_
|
: false_
|
||||||
{
|
{
|
||||||
#if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
|
|
||||||
using false_::value;
|
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
struct is_empty_base<empty_base>
|
struct is_empty_base<empty_base>
|
||||||
: true_
|
: true_
|
||||||
{
|
{
|
||||||
#if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
|
|
||||||
using true_::value;
|
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}}
|
}}
|
||||||
|
@@ -19,7 +19,6 @@
|
|||||||
#include <boost/mpl/aux_/erase_impl.hpp>
|
#include <boost/mpl/aux_/erase_impl.hpp>
|
||||||
#include <boost/mpl/aux_/na_spec.hpp>
|
#include <boost/mpl/aux_/na_spec.hpp>
|
||||||
#include <boost/mpl/aux_/lambda_support.hpp>
|
#include <boost/mpl/aux_/lambda_support.hpp>
|
||||||
#include <boost/mpl/aux_/config/msvc_typename.hpp>
|
|
||||||
|
|
||||||
namespace boost { namespace mpl {
|
namespace boost { namespace mpl {
|
||||||
|
|
||||||
|
@@ -19,7 +19,6 @@
|
|||||||
#include <boost/mpl/aux_/erase_key_impl.hpp>
|
#include <boost/mpl/aux_/erase_key_impl.hpp>
|
||||||
#include <boost/mpl/aux_/na_spec.hpp>
|
#include <boost/mpl/aux_/na_spec.hpp>
|
||||||
#include <boost/mpl/aux_/lambda_support.hpp>
|
#include <boost/mpl/aux_/lambda_support.hpp>
|
||||||
#include <boost/mpl/aux_/config/msvc_typename.hpp>
|
|
||||||
|
|
||||||
namespace boost { namespace mpl {
|
namespace boost { namespace mpl {
|
||||||
|
|
||||||
|
@@ -29,10 +29,8 @@ template<
|
|||||||
, typename BOOST_MPL_AUX_NA_PARAM(F2)
|
, typename BOOST_MPL_AUX_NA_PARAM(F2)
|
||||||
>
|
>
|
||||||
struct eval_if
|
struct eval_if
|
||||||
#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) \
|
#if BOOST_WORKAROUND(BOOST_MPL_CFG_GCC, >= 0x0300) \
|
||||||
|| ( BOOST_WORKAROUND(BOOST_MPL_CFG_GCC, >= 0x0300) \
|
&& BOOST_WORKAROUND(BOOST_MPL_CFG_GCC, BOOST_TESTED_AT(0x0304))
|
||||||
&& BOOST_WORKAROUND(BOOST_MPL_CFG_GCC, BOOST_TESTED_AT(0x0304)) \
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
typedef typename if_<C,F1,F2>::type f_;
|
typedef typename if_<C,F1,F2>::type f_;
|
||||||
typedef typename f_::type type;
|
typedef typename f_::type type;
|
||||||
@@ -51,10 +49,8 @@ template<
|
|||||||
, typename F2
|
, typename F2
|
||||||
>
|
>
|
||||||
struct eval_if_c
|
struct eval_if_c
|
||||||
#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) \
|
#if BOOST_WORKAROUND(BOOST_MPL_CFG_GCC, >= 0x0300) \
|
||||||
|| ( BOOST_WORKAROUND(BOOST_MPL_CFG_GCC, >= 0x0300) \
|
&& BOOST_WORKAROUND(BOOST_MPL_CFG_GCC, BOOST_TESTED_AT(0x0304))
|
||||||
&& BOOST_WORKAROUND(BOOST_MPL_CFG_GCC, BOOST_TESTED_AT(0x0304)) \
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
typedef typename if_c<C,F1,F2>::type f_;
|
typedef typename if_c<C,F1,F2>::type f_;
|
||||||
typedef typename f_::type type;
|
typedef typename f_::type type;
|
||||||
|
@@ -39,123 +39,10 @@
|
|||||||
|
|
||||||
#if !defined(BOOST_MPL_CFG_NO_HAS_XXX)
|
#if !defined(BOOST_MPL_CFG_NO_HAS_XXX)
|
||||||
|
|
||||||
# if BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
|
|
||||||
|
|
||||||
// agurt, 11/sep/02: MSVC-specific version (< 7.1), based on a USENET
|
|
||||||
// newsgroup's posting by John Madsen (comp.lang.c++.moderated,
|
|
||||||
// 1999-11-12 19:17:06 GMT); the code is _not_ standard-conforming, but
|
|
||||||
// it works way more reliably than the SFINAE-based implementation
|
|
||||||
|
|
||||||
// Modified dwa 8/Oct/02 to handle reference types.
|
|
||||||
|
|
||||||
# include <boost/mpl/if.hpp>
|
|
||||||
# include <boost/mpl/bool.hpp>
|
|
||||||
|
|
||||||
namespace boost { namespace mpl { namespace aux {
|
|
||||||
|
|
||||||
struct has_xxx_tag;
|
|
||||||
|
|
||||||
#if BOOST_WORKAROUND(BOOST_MSVC, == 1300)
|
|
||||||
template< typename U > struct msvc_incomplete_array
|
|
||||||
{
|
|
||||||
typedef char (&type)[sizeof(U) + 1];
|
|
||||||
};
|
|
||||||
#endif
|
|
||||||
|
|
||||||
template< typename T >
|
|
||||||
struct msvc_is_incomplete
|
|
||||||
{
|
|
||||||
// MSVC is capable of some kinds of SFINAE. If U is an incomplete
|
|
||||||
// type, it won't pick the second overload
|
|
||||||
static char tester(...);
|
|
||||||
|
|
||||||
#if BOOST_WORKAROUND(BOOST_MSVC, == 1300)
|
|
||||||
template< typename U >
|
|
||||||
static typename msvc_incomplete_array<U>::type tester(type_wrapper<U>);
|
|
||||||
#else
|
|
||||||
template< typename U >
|
|
||||||
static char (& tester(type_wrapper<U>) )[sizeof(U)+1];
|
|
||||||
#endif
|
|
||||||
|
|
||||||
BOOST_STATIC_CONSTANT(bool, value =
|
|
||||||
sizeof(tester(type_wrapper<T>())) == 1
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
template<>
|
|
||||||
struct msvc_is_incomplete<int>
|
|
||||||
{
|
|
||||||
BOOST_STATIC_CONSTANT(bool, value = false);
|
|
||||||
};
|
|
||||||
|
|
||||||
}}}
|
|
||||||
|
|
||||||
# define BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF_(trait, name, default_) \
|
|
||||||
template< typename T, typename name = ::boost::mpl::aux::has_xxx_tag > \
|
|
||||||
struct BOOST_PP_CAT(trait,_impl) : T \
|
|
||||||
{ \
|
|
||||||
static boost::mpl::aux::no_tag \
|
|
||||||
test(void(*)(::boost::mpl::aux::has_xxx_tag)); \
|
|
||||||
\
|
|
||||||
static boost::mpl::aux::yes_tag test(...); \
|
|
||||||
\
|
|
||||||
BOOST_STATIC_CONSTANT(bool, value = \
|
|
||||||
sizeof(test(static_cast<void(*)(name)>(0))) \
|
|
||||||
!= sizeof(boost::mpl::aux::no_tag) \
|
|
||||||
); \
|
|
||||||
typedef boost::mpl::bool_<value> type; \
|
|
||||||
}; \
|
|
||||||
\
|
|
||||||
template< typename T, typename fallback_ = boost::mpl::bool_<default_> > \
|
|
||||||
struct trait \
|
|
||||||
: boost::mpl::if_c< \
|
|
||||||
boost::mpl::aux::msvc_is_incomplete<T>::value \
|
|
||||||
, boost::mpl::bool_<false> \
|
|
||||||
, BOOST_PP_CAT(trait,_impl)<T> \
|
|
||||||
>::type \
|
|
||||||
{ \
|
|
||||||
}; \
|
|
||||||
\
|
|
||||||
BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, void) \
|
|
||||||
BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, bool) \
|
|
||||||
BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, char) \
|
|
||||||
BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, signed char) \
|
|
||||||
BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, unsigned char) \
|
|
||||||
BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, signed short) \
|
|
||||||
BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, unsigned short) \
|
|
||||||
BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, signed int) \
|
|
||||||
BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, unsigned int) \
|
|
||||||
BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, signed long) \
|
|
||||||
BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, unsigned long) \
|
|
||||||
BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, float) \
|
|
||||||
BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, double) \
|
|
||||||
BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, long double) \
|
|
||||||
/**/
|
|
||||||
|
|
||||||
# define BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, T) \
|
|
||||||
template<> struct trait<T> \
|
|
||||||
{ \
|
|
||||||
BOOST_STATIC_CONSTANT(bool, value = false); \
|
|
||||||
typedef boost::mpl::bool_<false> type; \
|
|
||||||
}; \
|
|
||||||
/**/
|
|
||||||
|
|
||||||
#if !defined(BOOST_NO_INTRINSIC_WCHAR_T)
|
|
||||||
# define BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(trait, name, unused) \
|
|
||||||
BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF_(trait, name, unused) \
|
|
||||||
BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, wchar_t) \
|
|
||||||
/**/
|
|
||||||
#else
|
|
||||||
# define BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(trait, name, unused) \
|
|
||||||
BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF_(trait, name, unused) \
|
|
||||||
/**/
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
// SFINAE-based implementations below are derived from a USENET newsgroup's
|
// SFINAE-based implementations below are derived from a USENET newsgroup's
|
||||||
// posting by Rani Sharoni (comp.lang.c++.moderated, 2002-03-17 07:45:09 PST)
|
// posting by Rani Sharoni (comp.lang.c++.moderated, 2002-03-17 07:45:09 PST)
|
||||||
|
|
||||||
# elif BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1400)) \
|
# if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1400)) \
|
||||||
|| BOOST_WORKAROUND(__IBMCPP__, <= 700)
|
|| BOOST_WORKAROUND(__IBMCPP__, <= 700)
|
||||||
|
|
||||||
// MSVC 7.1+ & VACPP
|
// MSVC 7.1+ & VACPP
|
||||||
@@ -256,7 +143,7 @@ struct trait \
|
|||||||
}; \
|
}; \
|
||||||
/**/
|
/**/
|
||||||
|
|
||||||
# endif // BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
|
# endif // BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1400))
|
||||||
|
|
||||||
|
|
||||||
#else // BOOST_MPL_CFG_NO_HAS_XXX
|
#else // BOOST_MPL_CFG_NO_HAS_XXX
|
||||||
|
@@ -28,53 +28,12 @@
|
|||||||
#include <boost/mpl/aux_/lambda_support.hpp>
|
#include <boost/mpl/aux_/lambda_support.hpp>
|
||||||
#include <boost/mpl/aux_/config/msvc.hpp>
|
#include <boost/mpl/aux_/config/msvc.hpp>
|
||||||
#include <boost/mpl/aux_/config/workaround.hpp>
|
#include <boost/mpl/aux_/config/workaround.hpp>
|
||||||
#if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
|
|
||||||
# include <boost/mpl/aux_/msvc_is_class.hpp>
|
|
||||||
#elif BOOST_WORKAROUND(BOOST_MSVC, == 1300)
|
|
||||||
# include <boost/type_traits/is_class.hpp>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <boost/type_traits/is_same.hpp>
|
#include <boost/type_traits/is_same.hpp>
|
||||||
|
|
||||||
namespace boost { namespace mpl {
|
namespace boost { namespace mpl {
|
||||||
|
|
||||||
#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
|
#if defined(BOOST_MPL_CFG_NO_HAS_XXX)
|
||||||
|
|
||||||
namespace aux {
|
|
||||||
|
|
||||||
// agurt, 11/jun/03:
|
|
||||||
// MSVC 6.5/7.0 fails if 'has_begin' is instantiated on a class type that has a
|
|
||||||
// 'begin' member that doesn't name a type; e.g. 'has_begin< std::vector<int> >'
|
|
||||||
// would fail; requiring 'T' to have _both_ 'tag' and 'begin' members workarounds
|
|
||||||
// the issue for most real-world cases
|
|
||||||
template< typename T > struct is_sequence_impl
|
|
||||||
: and_<
|
|
||||||
identity< aux::has_tag<T> >
|
|
||||||
, identity< aux::has_begin<T> >
|
|
||||||
>
|
|
||||||
{
|
|
||||||
};
|
|
||||||
|
|
||||||
} // namespace aux
|
|
||||||
|
|
||||||
template<
|
|
||||||
typename BOOST_MPL_AUX_NA_PARAM(T)
|
|
||||||
>
|
|
||||||
struct is_sequence
|
|
||||||
: if_<
|
|
||||||
#if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
|
|
||||||
aux::msvc_is_class<T>
|
|
||||||
#else
|
|
||||||
boost::is_class<T>
|
|
||||||
#endif
|
|
||||||
, aux::is_sequence_impl<T>
|
|
||||||
, bool_<false>
|
|
||||||
>::type
|
|
||||||
{
|
|
||||||
BOOST_MPL_AUX_LAMBDA_SUPPORT(1, is_sequence, (T))
|
|
||||||
};
|
|
||||||
|
|
||||||
#elif defined(BOOST_MPL_CFG_NO_HAS_XXX)
|
|
||||||
|
|
||||||
template<
|
template<
|
||||||
typename BOOST_MPL_AUX_NA_PARAM(T)
|
typename BOOST_MPL_AUX_NA_PARAM(T)
|
||||||
@@ -95,7 +54,7 @@ struct is_sequence
|
|||||||
BOOST_MPL_AUX_LAMBDA_SUPPORT(1, is_sequence, (T))
|
BOOST_MPL_AUX_LAMBDA_SUPPORT(1, is_sequence, (T))
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // BOOST_MSVC
|
#endif // BOOST_MPL_CFG_NO_HAS_XXX
|
||||||
|
|
||||||
|
|
||||||
BOOST_MPL_AUX_NA_SPEC_NO_ETI(1, is_sequence)
|
BOOST_MPL_AUX_NA_SPEC_NO_ETI(1, is_sequence)
|
||||||
|
@@ -28,10 +28,6 @@ template<
|
|||||||
>
|
>
|
||||||
struct l_item
|
struct l_item
|
||||||
{
|
{
|
||||||
// agurt, 17/jul/03: to facilitate the deficient 'is_sequence' implementation
|
|
||||||
#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
|
|
||||||
typedef int begin;
|
|
||||||
#endif
|
|
||||||
typedef aux::list_tag tag;
|
typedef aux::list_tag tag;
|
||||||
typedef l_item type;
|
typedef l_item type;
|
||||||
|
|
||||||
@@ -42,9 +38,6 @@ struct l_item
|
|||||||
|
|
||||||
struct l_end
|
struct l_end
|
||||||
{
|
{
|
||||||
#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
|
|
||||||
typedef int begin;
|
|
||||||
#endif
|
|
||||||
typedef aux::list_tag tag;
|
typedef aux::list_tag tag;
|
||||||
typedef l_end type;
|
typedef l_end type;
|
||||||
typedef long_<0> size;
|
typedef long_<0> size;
|
||||||
|
@@ -22,27 +22,11 @@
|
|||||||
|
|
||||||
namespace boost { namespace mpl {
|
namespace boost { namespace mpl {
|
||||||
|
|
||||||
#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
|
|
||||||
namespace aux
|
|
||||||
{
|
|
||||||
template <class N>
|
|
||||||
struct is_even_base
|
|
||||||
{
|
|
||||||
enum { value = (N::value % 2) == 0 };
|
|
||||||
typedef bool_<value> type;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
template<
|
template<
|
||||||
typename BOOST_MPL_AUX_NA_PARAM(N)
|
typename BOOST_MPL_AUX_NA_PARAM(N)
|
||||||
>
|
>
|
||||||
struct is_even
|
struct is_even
|
||||||
#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
|
|
||||||
: aux::is_even_base<N>::type
|
|
||||||
#else
|
|
||||||
: bool_<((N::value % 2) == 0)>
|
: bool_<((N::value % 2) == 0)>
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
BOOST_MPL_AUX_LAMBDA_SUPPORT(1,is_even,(N))
|
BOOST_MPL_AUX_LAMBDA_SUPPORT(1,is_even,(N))
|
||||||
};
|
};
|
||||||
|
@@ -23,47 +23,8 @@
|
|||||||
#include <boost/mpl/aux_/config/workaround.hpp>
|
#include <boost/mpl/aux_/config/workaround.hpp>
|
||||||
#include <boost/mpl/aux_/config/msvc.hpp>
|
#include <boost/mpl/aux_/config/msvc.hpp>
|
||||||
|
|
||||||
#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
|
|
||||||
# include <boost/mpl/if.hpp>
|
|
||||||
# include <boost/type_traits/is_reference.hpp>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
namespace boost { namespace mpl {
|
namespace boost { namespace mpl {
|
||||||
|
|
||||||
#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
|
|
||||||
|
|
||||||
namespace aux {
|
|
||||||
template< typename S, typename U >
|
|
||||||
struct multiset_count_impl
|
|
||||||
: int_< sizeof(S::key_count(BOOST_MPL_AUX_STATIC_CAST(U*,0))) - 1 >
|
|
||||||
{
|
|
||||||
};
|
|
||||||
|
|
||||||
template< typename S, typename U >
|
|
||||||
struct multiset_count_ref_impl
|
|
||||||
{
|
|
||||||
typedef U (* u_)();
|
|
||||||
typedef int_< sizeof(S::ref_key_count(BOOST_MPL_AUX_STATIC_CAST(u_,0))) - 1 > type_;
|
|
||||||
BOOST_STATIC_CONSTANT(int, value = type_::value);
|
|
||||||
typedef type_ type;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
template<>
|
|
||||||
struct count_impl< aux::multiset_tag >
|
|
||||||
{
|
|
||||||
template< typename Set, typename Key > struct apply
|
|
||||||
: if_<
|
|
||||||
is_reference<Key>
|
|
||||||
, aux::multiset_count_ref_impl<Set,Key>
|
|
||||||
, aux::multiset_count_impl<Set,Key>
|
|
||||||
>::type
|
|
||||||
{
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
#else
|
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
struct count_impl< aux::multiset_tag >
|
struct count_impl< aux::multiset_tag >
|
||||||
{
|
{
|
||||||
@@ -75,8 +36,6 @@ struct count_impl< aux::multiset_tag >
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
|
|
||||||
|
|
||||||
}}
|
}}
|
||||||
|
|
||||||
#endif // BOOST_MPL_MULTISET_AUX_COUNT_IMPL_HPP_INCLUDED
|
#endif // BOOST_MPL_MULTISET_AUX_COUNT_IMPL_HPP_INCLUDED
|
||||||
|
@@ -24,56 +24,8 @@
|
|||||||
#include <boost/mpl/aux_/config/msvc.hpp>
|
#include <boost/mpl/aux_/config/msvc.hpp>
|
||||||
#include <boost/mpl/aux_/config/workaround.hpp>
|
#include <boost/mpl/aux_/config/workaround.hpp>
|
||||||
|
|
||||||
#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
|
|
||||||
# include <boost/mpl/eval_if.hpp>
|
|
||||||
# include <boost/mpl/next.hpp>
|
|
||||||
# include <boost/type_traits/is_same.hpp>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
namespace boost { namespace mpl {
|
namespace boost { namespace mpl {
|
||||||
|
|
||||||
#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
|
|
||||||
|
|
||||||
template< typename T, typename Base >
|
|
||||||
struct ms_item
|
|
||||||
{
|
|
||||||
typedef aux::multiset_tag tag;
|
|
||||||
|
|
||||||
template< typename U > struct prior_count
|
|
||||||
{
|
|
||||||
enum { msvc70_wknd_ = sizeof(Base::key_count(BOOST_MPL_AUX_STATIC_CAST(U*,0))) };
|
|
||||||
typedef int_< msvc70_wknd_ > count_;
|
|
||||||
typedef typename eval_if< is_same<T,U>, next<count_>, count_ >::type c_;
|
|
||||||
#if defined(BOOST_MPL_CFG_NO_DEPENDENT_ARRAY_TYPES)
|
|
||||||
typedef typename aux::weighted_tag<BOOST_MPL_AUX_MSVC_VALUE_WKND(c_)::value>::type type;
|
|
||||||
#else
|
|
||||||
typedef char (&type)[BOOST_MPL_AUX_MSVC_VALUE_WKND(c_)::value];
|
|
||||||
#endif
|
|
||||||
};
|
|
||||||
|
|
||||||
template< typename U > struct prior_ref_count
|
|
||||||
{
|
|
||||||
typedef U (* u_)();
|
|
||||||
enum { msvc70_wknd_ = sizeof(Base::ref_key_count(BOOST_MPL_AUX_STATIC_CAST(u_,0))) };
|
|
||||||
typedef int_< msvc70_wknd_ > count_;
|
|
||||||
typedef typename eval_if< is_same<T,U>, next<count_>, count_ >::type c_;
|
|
||||||
#if defined(BOOST_MPL_CFG_NO_DEPENDENT_ARRAY_TYPES)
|
|
||||||
typedef typename aux::weighted_tag<BOOST_MPL_AUX_MSVC_VALUE_WKND(c_)::value>::type type;
|
|
||||||
#else
|
|
||||||
typedef char (&type)[BOOST_MPL_AUX_MSVC_VALUE_WKND(c_)::value];
|
|
||||||
#endif
|
|
||||||
};
|
|
||||||
|
|
||||||
template< typename U >
|
|
||||||
static typename prior_count<U>::type key_count(U*);
|
|
||||||
|
|
||||||
template< typename U >
|
|
||||||
static typename prior_ref_count<U>::type ref_key_count(U (*)());
|
|
||||||
};
|
|
||||||
|
|
||||||
#else // BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
|
|
||||||
|
|
||||||
namespace aux {
|
namespace aux {
|
||||||
template< typename U, typename Base >
|
template< typename U, typename Base >
|
||||||
struct prior_key_count
|
struct prior_key_count
|
||||||
@@ -107,8 +59,6 @@ struct ms_item
|
|||||||
static typename aux::prior_key_count<U,Base>::type key_count(aux::type_wrapper<U>*);
|
static typename aux::prior_key_count<U,Base>::type key_count(aux::type_wrapper<U>*);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
|
|
||||||
|
|
||||||
}}
|
}}
|
||||||
|
|
||||||
#endif // BOOST_MPL_MULTISET_AUX_ITEM_HPP_INCLUDED
|
#endif // BOOST_MPL_MULTISET_AUX_ITEM_HPP_INCLUDED
|
||||||
|
@@ -17,11 +17,11 @@
|
|||||||
#include <boost/mpl/aux_/config/msvc.hpp>
|
#include <boost/mpl/aux_/config/msvc.hpp>
|
||||||
#include <boost/mpl/aux_/config/workaround.hpp>
|
#include <boost/mpl/aux_/config/workaround.hpp>
|
||||||
|
|
||||||
// agurt 21/sep/04: portability macro for the sake of MSVC 6.x-7.0;
|
// agurt 21/sep/04: portability macro for the sake of Borland;
|
||||||
// resolves conflicts with 'boost::numeric_cast' function template.
|
// resolves conflicts with 'boost::numeric_cast' function template.
|
||||||
// use it in your own code _only_ if you care about compatibility with
|
// use it in your own code _only_ if you care about compatibility with
|
||||||
// these outdated compilers!
|
// these outdated compilers!
|
||||||
#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x570) )
|
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x570) )
|
||||||
# define BOOST_MPL_AUX_NUMERIC_CAST numeric_cast_
|
# define BOOST_MPL_AUX_NUMERIC_CAST numeric_cast_
|
||||||
#else
|
#else
|
||||||
# define BOOST_MPL_AUX_NUMERIC_CAST numeric_cast
|
# define BOOST_MPL_AUX_NUMERIC_CAST numeric_cast
|
||||||
|
Reference in New Issue
Block a user