mirror of
https://github.com/boostorg/mpl.git
synced 2025-08-01 05:44:37 +02:00
MPL: Remove MSVC 6 and 7 early template instantiation workaround.
[SVN r85945]
This commit is contained in:
@@ -45,7 +45,6 @@
|
||||
# include <boost/mpl/aux_/config/lambda.hpp>
|
||||
# include <boost/mpl/aux_/config/dtp.hpp>
|
||||
# include <boost/mpl/aux_/nttp_decl.hpp>
|
||||
# include <boost/mpl/aux_/config/eti.hpp>
|
||||
# include <boost/mpl/aux_/config/msvc.hpp>
|
||||
# include <boost/mpl/aux_/config/workaround.hpp>
|
||||
|
||||
@@ -165,14 +164,6 @@ struct BOOST_PP_CAT(apply,i_)
|
||||
};
|
||||
|
||||
|
||||
#if defined(BOOST_MPL_CFG_MSVC_ETI_BUG)
|
||||
/// workaround for ETI bug
|
||||
template<>
|
||||
struct BOOST_PP_CAT(apply,i_)<AUX778076_APPLY_N_SPEC_PARAMS(i_, int)>
|
||||
{
|
||||
typedef int type;
|
||||
};
|
||||
#endif
|
||||
|
||||
# if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
|
||||
|
||||
|
@@ -42,7 +42,6 @@
|
||||
# include <boost/mpl/aux_/config/bcc.hpp>
|
||||
# include <boost/mpl/aux_/config/ctps.hpp>
|
||||
# include <boost/mpl/aux_/config/dtp.hpp>
|
||||
# include <boost/mpl/aux_/config/eti.hpp>
|
||||
# include <boost/mpl/aux_/config/msvc.hpp>
|
||||
# include <boost/mpl/aux_/config/workaround.hpp>
|
||||
|
||||
@@ -161,14 +160,6 @@ struct BOOST_PP_CAT(apply_wrap,i_)<F,true_>
|
||||
|
||||
# endif // workarounds
|
||||
|
||||
#if defined(BOOST_MPL_CFG_MSVC_ETI_BUG)
|
||||
/// workaround for ETI bug
|
||||
template<>
|
||||
struct BOOST_PP_CAT(apply_wrap,i_)<AUX778076_APPLY_WRAP_SPEC_PARAMS(i_, int)>
|
||||
{
|
||||
typedef int type;
|
||||
};
|
||||
#endif
|
||||
|
||||
# undef i_
|
||||
|
||||
|
@@ -35,7 +35,6 @@
|
||||
|
||||
# include <boost/mpl/limits/unrolling.hpp>
|
||||
# include <boost/mpl/aux_/nttp_decl.hpp>
|
||||
# include <boost/mpl/aux_/config/eti.hpp>
|
||||
|
||||
# include <boost/preprocessor/iterate.hpp>
|
||||
# include <boost/preprocessor/cat.hpp>
|
||||
@@ -101,13 +100,6 @@ struct advance_backward< BOOST_PP_FRAME_ITERATION(1) >
|
||||
typedef BOOST_PP_CAT(iter,BOOST_PP_FRAME_ITERATION(1)) type;
|
||||
};
|
||||
|
||||
#if defined(BOOST_MPL_CFG_MSVC_60_ETI_BUG)
|
||||
/// ETI workaround
|
||||
template<> struct apply<int>
|
||||
{
|
||||
typedef int type;
|
||||
};
|
||||
#endif
|
||||
};
|
||||
|
||||
#undef i_
|
||||
|
@@ -35,7 +35,6 @@
|
||||
|
||||
# include <boost/mpl/limits/unrolling.hpp>
|
||||
# include <boost/mpl/aux_/nttp_decl.hpp>
|
||||
# include <boost/mpl/aux_/config/eti.hpp>
|
||||
|
||||
# include <boost/preprocessor/iterate.hpp>
|
||||
# include <boost/preprocessor/cat.hpp>
|
||||
@@ -100,13 +99,6 @@ struct advance_forward< BOOST_PP_FRAME_ITERATION(1) >
|
||||
typedef BOOST_PP_CAT(iter,i_) type;
|
||||
};
|
||||
|
||||
#if defined(BOOST_MPL_CFG_MSVC_60_ETI_BUG)
|
||||
/// ETI workaround
|
||||
template<> struct apply<int>
|
||||
{
|
||||
typedef int type;
|
||||
};
|
||||
#endif
|
||||
};
|
||||
|
||||
#undef i_
|
||||
|
@@ -21,7 +21,6 @@
|
||||
#include <boost/mpl/aux_/has_begin.hpp>
|
||||
#include <boost/mpl/aux_/na.hpp>
|
||||
#include <boost/mpl/aux_/traits_lambda_spec.hpp>
|
||||
#include <boost/mpl/aux_/config/eti.hpp>
|
||||
|
||||
namespace boost { namespace mpl {
|
||||
|
||||
|
@@ -16,7 +16,6 @@
|
||||
|
||||
#include <boost/mpl/clear_fwd.hpp>
|
||||
#include <boost/mpl/aux_/traits_lambda_spec.hpp>
|
||||
#include <boost/mpl/aux_/config/eti.hpp>
|
||||
|
||||
namespace boost { namespace mpl {
|
||||
|
||||
|
@@ -1,47 +0,0 @@
|
||||
|
||||
#ifndef BOOST_MPL_AUX_CONFIG_ETI_HPP_INCLUDED
|
||||
#define BOOST_MPL_AUX_CONFIG_ETI_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>
|
||||
|
||||
// flags for MSVC 6.5's so-called "early template instantiation bug"
|
||||
#if !defined(BOOST_MPL_CFG_MSVC_60_ETI_BUG) \
|
||||
&& !defined(BOOST_MPL_PREPROCESSING_MODE) \
|
||||
&& BOOST_WORKAROUND(BOOST_MSVC, < 1300)
|
||||
|
||||
# define BOOST_MPL_CFG_MSVC_60_ETI_BUG
|
||||
|
||||
#endif
|
||||
|
||||
#if !defined(BOOST_MPL_CFG_MSVC_70_ETI_BUG) \
|
||||
&& !defined(BOOST_MPL_PREPROCESSING_MODE) \
|
||||
&& BOOST_WORKAROUND(BOOST_MSVC, == 1300)
|
||||
|
||||
# define BOOST_MPL_CFG_MSVC_70_ETI_BUG
|
||||
|
||||
#endif
|
||||
|
||||
#if !defined(BOOST_MPL_CFG_MSVC_ETI_BUG) \
|
||||
&& !defined(BOOST_MPL_PREPROCESSING_MODE) \
|
||||
&& ( defined(BOOST_MPL_CFG_MSVC_60_ETI_BUG) \
|
||||
|| defined(BOOST_MPL_CFG_MSVC_70_ETI_BUG) \
|
||||
)
|
||||
|
||||
# define BOOST_MPL_CFG_MSVC_ETI_BUG
|
||||
|
||||
#endif
|
||||
|
||||
#endif // BOOST_MPL_AUX_CONFIG_ETI_HPP_INCLUDED
|
@@ -20,7 +20,6 @@
|
||||
# include <boost/mpl/aux_/config/workaround.hpp>
|
||||
# include <boost/mpl/aux_/config/ctps.hpp>
|
||||
# include <boost/mpl/aux_/nttp_decl.hpp>
|
||||
# include <boost/mpl/aux_/config/eti.hpp>
|
||||
|
||||
# include <boost/preprocessor/iterate.hpp>
|
||||
# include <boost/preprocessor/dec.hpp>
|
||||
@@ -248,14 +247,6 @@ struct AUX778076_FOLD_CHUNK_NAME<-1>
|
||||
typedef typename res_::iterator iterator;
|
||||
};
|
||||
|
||||
#if defined(BOOST_MPL_CFG_MSVC_60_ETI_BUG)
|
||||
/// ETI workaround
|
||||
template<> struct result_<int,int,int,int>
|
||||
{
|
||||
typedef int state;
|
||||
typedef int iterator;
|
||||
};
|
||||
#endif
|
||||
};
|
||||
|
||||
template<
|
||||
@@ -348,14 +339,6 @@ template<> struct AUX778076_FOLD_CHUNK_NAME<n_>
|
||||
typedef BOOST_PP_CAT(iter,n_) iterator;
|
||||
};
|
||||
|
||||
#if defined(BOOST_MPL_CFG_MSVC_60_ETI_BUG)
|
||||
/// ETI workaround
|
||||
template<> struct result_<int,int,int,int>
|
||||
{
|
||||
typedef int state;
|
||||
typedef int iterator;
|
||||
};
|
||||
#endif
|
||||
};
|
||||
|
||||
#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
|
||||
|
@@ -1,64 +0,0 @@
|
||||
|
||||
#ifndef BOOST_MPL_AUX_IS_MSVC_ETI_ARG_HPP_INCLUDED
|
||||
#define BOOST_MPL_AUX_IS_MSVC_ETI_ARG_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_/yes_no.hpp>
|
||||
#include <boost/mpl/aux_/config/eti.hpp>
|
||||
#include <boost/mpl/aux_/config/static_constant.hpp>
|
||||
|
||||
namespace boost { namespace mpl { namespace aux {
|
||||
|
||||
#if defined(BOOST_MPL_CFG_MSVC_ETI_BUG)
|
||||
|
||||
#if defined(BOOST_MPL_CFG_MSVC_60_ETI_BUG)
|
||||
|
||||
template< typename T >
|
||||
struct is_msvc_eti_arg
|
||||
{
|
||||
BOOST_STATIC_CONSTANT(bool, value = false);
|
||||
};
|
||||
|
||||
#else // BOOST_MPL_CFG_MSVC_60_ETI_BUG
|
||||
|
||||
struct eti_int_convertible
|
||||
{
|
||||
eti_int_convertible(int);
|
||||
};
|
||||
|
||||
template< typename T >
|
||||
struct is_msvc_eti_arg
|
||||
{
|
||||
static no_tag test(...);
|
||||
static yes_tag test(eti_int_convertible);
|
||||
static T& get();
|
||||
|
||||
BOOST_STATIC_CONSTANT(bool, value =
|
||||
sizeof(test(get())) == sizeof(yes_tag)
|
||||
);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
template<>
|
||||
struct is_msvc_eti_arg<int>
|
||||
{
|
||||
BOOST_STATIC_CONSTANT(bool, value = true);
|
||||
};
|
||||
|
||||
#endif // BOOST_MPL_CFG_MSVC_ETI_BUG
|
||||
|
||||
}}}
|
||||
|
||||
#endif // BOOST_MPL_AUX_IS_MSVC_ETI_ARG_HPP_INCLUDED
|
@@ -14,44 +14,11 @@
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#include <boost/mpl/aux_/is_msvc_eti_arg.hpp>
|
||||
#include <boost/mpl/aux_/config/eti.hpp>
|
||||
#include <boost/mpl/aux_/config/gcc.hpp>
|
||||
#include <boost/mpl/aux_/config/workaround.hpp>
|
||||
|
||||
namespace boost { namespace mpl { namespace aux {
|
||||
|
||||
#if defined(BOOST_MPL_CFG_MSVC_70_ETI_BUG)
|
||||
|
||||
template< bool > struct msvc_eti_base_impl
|
||||
{
|
||||
template< typename T > struct result_
|
||||
: T
|
||||
{
|
||||
typedef T type;
|
||||
};
|
||||
};
|
||||
|
||||
template<> struct msvc_eti_base_impl<true>
|
||||
{
|
||||
template< typename T > struct result_
|
||||
{
|
||||
typedef result_ type;
|
||||
typedef result_ first;
|
||||
typedef result_ second;
|
||||
typedef result_ tag;
|
||||
enum { value = 0 };
|
||||
};
|
||||
};
|
||||
|
||||
template< typename T > struct msvc_eti_base
|
||||
: msvc_eti_base_impl< is_msvc_eti_arg<T>::value >
|
||||
::template result_<T>
|
||||
{
|
||||
};
|
||||
|
||||
#else // !BOOST_MPL_CFG_MSVC_70_ETI_BUG
|
||||
|
||||
template< typename T > struct msvc_eti_base
|
||||
: T
|
||||
{
|
||||
@@ -61,8 +28,6 @@ template< typename T > struct msvc_eti_base
|
||||
typedef T type;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
template<> struct msvc_eti_base<int>
|
||||
{
|
||||
typedef msvc_eti_base type;
|
||||
|
@@ -1,62 +0,0 @@
|
||||
|
||||
#ifndef BOOST_MPL_AUX_MSVC_TYPE_HPP_INCLUDED
|
||||
#define BOOST_MPL_AUX_MSVC_TYPE_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/eti.hpp>
|
||||
#include <boost/mpl/aux_/is_msvc_eti_arg.hpp>
|
||||
|
||||
namespace boost { namespace mpl { namespace aux {
|
||||
|
||||
#if defined(BOOST_MPL_CFG_MSVC_70_ETI_BUG)
|
||||
|
||||
template< bool > struct msvc_type_impl
|
||||
{
|
||||
template< typename T > struct result_
|
||||
{
|
||||
typedef typename T::type type;
|
||||
};
|
||||
};
|
||||
|
||||
template<> struct msvc_type_impl<true>
|
||||
{
|
||||
template< typename T > struct result_
|
||||
{
|
||||
typedef result_ type;
|
||||
};
|
||||
};
|
||||
|
||||
template< typename T > struct msvc_type
|
||||
: msvc_type_impl< is_msvc_eti_arg<T>::value >
|
||||
::template result_<T>
|
||||
{
|
||||
};
|
||||
|
||||
#else // BOOST_MPL_CFG_MSVC_70_ETI_BUG
|
||||
|
||||
template< typename T > struct msvc_type
|
||||
{
|
||||
typedef typename T::type type;
|
||||
};
|
||||
|
||||
template<> struct msvc_type<int>
|
||||
{
|
||||
typedef int type;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
}}}
|
||||
|
||||
#endif // BOOST_MPL_AUX_MSVC_TYPE_HPP_INCLUDED
|
@@ -28,7 +28,6 @@
|
||||
#include <boost/mpl/aux_/preprocessor/def_params_tail.hpp>
|
||||
#include <boost/mpl/aux_/lambda_arity_param.hpp>
|
||||
#include <boost/mpl/aux_/config/dtp.hpp>
|
||||
#include <boost/mpl/aux_/config/eti.hpp>
|
||||
#include <boost/mpl/aux_/nttp_decl.hpp>
|
||||
#include <boost/mpl/aux_/config/ttp.hpp>
|
||||
#include <boost/mpl/aux_/config/lambda.hpp>
|
||||
@@ -136,18 +135,8 @@ struct template_arity< \
|
||||
# define BOOST_MPL_AUX_NA_SPEC_TEMPLATE_ARITY(i, j, name) /**/
|
||||
#endif
|
||||
|
||||
#if defined(BOOST_MPL_CFG_MSVC_ETI_BUG)
|
||||
# define BOOST_MPL_AUX_NA_SPEC_ETI(i, name) \
|
||||
template<> \
|
||||
struct name< BOOST_MPL_PP_ENUM(i, int) > \
|
||||
{ \
|
||||
typedef int type; \
|
||||
enum { value = 0 }; \
|
||||
}; \
|
||||
/**/
|
||||
#else
|
||||
// Obsolete. Remove.
|
||||
# define BOOST_MPL_AUX_NA_SPEC_ETI(i, name) /**/
|
||||
#endif
|
||||
|
||||
#define BOOST_MPL_AUX_NA_PARAM(param) param = na
|
||||
|
||||
|
@@ -27,7 +27,6 @@
|
||||
# include <boost/mpl/aux_/na_spec.hpp>
|
||||
# include <boost/mpl/aux_/lambda_support.hpp>
|
||||
# include <boost/mpl/aux_/value_wknd.hpp>
|
||||
# include <boost/mpl/aux_/config/eti.hpp>
|
||||
# include <boost/mpl/aux_/nttp_decl.hpp>
|
||||
#endif
|
||||
|
||||
@@ -46,7 +45,6 @@
|
||||
# include <boost/mpl/aux_/preprocessor/add.hpp>
|
||||
# include <boost/mpl/aux_/preprocessor/sub.hpp>
|
||||
# include <boost/mpl/aux_/config/ctps.hpp>
|
||||
# include <boost/mpl/aux_/config/eti.hpp>
|
||||
# include <boost/mpl/aux_/config/msvc.hpp>
|
||||
# include <boost/mpl/aux_/config/workaround.hpp>
|
||||
|
||||
@@ -229,21 +227,10 @@ struct AUX778076_OP_NAME
|
||||
|
||||
#endif
|
||||
|
||||
#if !defined(BOOST_MPL_CFG_MSVC_ETI_BUG)
|
||||
: AUX778076_OP_IMPL_NAME<
|
||||
typename AUX778076_OP_TAG_NAME<N1>::type
|
||||
, typename AUX778076_OP_TAG_NAME<N2>::type
|
||||
>::template apply<N1,N2>::type
|
||||
#else
|
||||
: aux::msvc_eti_base< typename apply_wrap2<
|
||||
AUX778076_OP_IMPL_NAME<
|
||||
typename AUX778076_OP_TAG_NAME<N1>::type
|
||||
, typename AUX778076_OP_TAG_NAME<N2>::type
|
||||
>
|
||||
, N1
|
||||
, N2
|
||||
>::type >::type
|
||||
#endif
|
||||
{
|
||||
#if AUX778076_OP_ARITY != 2
|
||||
|
||||
|
@@ -260,14 +260,6 @@ struct AUX778076_FOLD_CHUNK_NAME<-1>
|
||||
typedef typename res_::iterator iterator;
|
||||
};
|
||||
|
||||
#if defined(BOOST_MPL_CFG_MSVC_60_ETI_BUG)
|
||||
/// ETI workaround
|
||||
template<> struct result_<int,int,int,int,int>
|
||||
{
|
||||
typedef int state;
|
||||
typedef int iterator;
|
||||
};
|
||||
#endif
|
||||
};
|
||||
|
||||
template<
|
||||
@@ -395,14 +387,6 @@ template<> struct AUX778076_FOLD_CHUNK_NAME<n_>
|
||||
typedef BOOST_PP_CAT(iter,n_) iterator;
|
||||
};
|
||||
|
||||
#if defined(BOOST_MPL_CFG_MSVC_60_ETI_BUG)
|
||||
/// ETI workaround
|
||||
template<> struct result_<int,int,int,int,int>
|
||||
{
|
||||
typedef int state;
|
||||
typedef int iterator;
|
||||
};
|
||||
#endif
|
||||
};
|
||||
|
||||
#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
|
||||
|
@@ -129,7 +129,6 @@ struct template_arity
|
||||
# endif // BOOST_MPL_CFG_EXTENDED_TEMPLATE_PARAMETERS_MATCHING
|
||||
# else // BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT
|
||||
|
||||
# include <boost/mpl/aux_/config/eti.hpp>
|
||||
|
||||
namespace boost { namespace mpl { namespace aux {
|
||||
|
||||
@@ -158,13 +157,6 @@ struct template_arity
|
||||
{
|
||||
};
|
||||
|
||||
#if defined(BOOST_MPL_CFG_MSVC_ETI_BUG)
|
||||
template<>
|
||||
struct template_arity<int>
|
||||
: mpl::int_<-1>
|
||||
{
|
||||
};
|
||||
#endif
|
||||
|
||||
}}}
|
||||
|
||||
|
@@ -23,17 +23,6 @@
|
||||
|
||||
# define BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC_IMPL(i, trait) /**/
|
||||
|
||||
#elif !defined(BOOST_MPL_CFG_MSVC_ETI_BUG)
|
||||
|
||||
# define BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC_IMPL(i, trait) \
|
||||
template<> struct trait<void_> \
|
||||
{ \
|
||||
template< BOOST_MPL_PP_PARAMS(i, typename T) > struct apply \
|
||||
{ \
|
||||
}; \
|
||||
}; \
|
||||
/**/
|
||||
|
||||
#else
|
||||
|
||||
# define BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC_IMPL(i, trait) \
|
||||
@@ -43,13 +32,6 @@ template<> struct trait<void_> \
|
||||
{ \
|
||||
}; \
|
||||
}; \
|
||||
template<> struct trait<int> \
|
||||
{ \
|
||||
template< BOOST_MPL_PP_PARAMS(i, typename T) > struct apply \
|
||||
{ \
|
||||
typedef int type; \
|
||||
}; \
|
||||
}; \
|
||||
/**/
|
||||
|
||||
#endif // BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT
|
||||
|
@@ -16,11 +16,9 @@
|
||||
|
||||
#include <boost/mpl/aux_/static_cast.hpp>
|
||||
#include <boost/mpl/aux_/config/integral.hpp>
|
||||
#include <boost/mpl/aux_/config/eti.hpp>
|
||||
#include <boost/mpl/aux_/config/workaround.hpp>
|
||||
|
||||
#if defined(BOOST_MPL_CFG_BCC_INTEGRAL_CONSTANTS) \
|
||||
|| defined(BOOST_MPL_CFG_MSVC_60_ETI_BUG)
|
||||
#if defined(BOOST_MPL_CFG_BCC_INTEGRAL_CONSTANTS)
|
||||
|
||||
# include <boost/mpl/int.hpp>
|
||||
|
||||
@@ -30,27 +28,13 @@ template< typename C_ > struct value_wknd
|
||||
{
|
||||
};
|
||||
|
||||
#if defined(BOOST_MPL_CFG_MSVC_60_ETI_BUG)
|
||||
template<> struct value_wknd<int>
|
||||
: int_<1>
|
||||
{
|
||||
using int_<1>::value;
|
||||
};
|
||||
#endif
|
||||
}}}
|
||||
|
||||
|
||||
#if !defined(BOOST_MPL_CFG_MSVC_60_ETI_BUG)
|
||||
# define BOOST_MPL_AUX_VALUE_WKND(C) \
|
||||
::BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::aux::value_wknd< C > \
|
||||
/**/
|
||||
# define BOOST_MPL_AUX_MSVC_VALUE_WKND(C) BOOST_MPL_AUX_VALUE_WKND(C)
|
||||
#else
|
||||
# define BOOST_MPL_AUX_VALUE_WKND(C) C
|
||||
# define BOOST_MPL_AUX_MSVC_VALUE_WKND(C) \
|
||||
::boost::mpl::aux::value_wknd< C > \
|
||||
/**/
|
||||
#endif
|
||||
|
||||
#else // BOOST_MPL_CFG_BCC_INTEGRAL_CONSTANTS
|
||||
|
||||
@@ -77,12 +61,6 @@ template< typename T > struct value_type_wknd
|
||||
typedef typename T::value_type type;
|
||||
};
|
||||
|
||||
#if defined(BOOST_MPL_CFG_MSVC_ETI_BUG)
|
||||
template<> struct value_type_wknd<int>
|
||||
{
|
||||
typedef int type;
|
||||
};
|
||||
#endif
|
||||
|
||||
}}}
|
||||
|
||||
|
@@ -20,7 +20,6 @@
|
||||
#include <boost/mpl/identity.hpp>
|
||||
#include <boost/mpl/eval_if.hpp>
|
||||
#include <boost/mpl/apply.hpp>
|
||||
#include <boost/mpl/aux_/msvc_eti_base.hpp>
|
||||
#include <boost/mpl/aux_/na_spec.hpp>
|
||||
#include <boost/mpl/aux_/lambda_support.hpp>
|
||||
#include <boost/mpl/aux_/config/forwarding.hpp>
|
||||
@@ -63,11 +62,11 @@ template<
|
||||
, typename BOOST_MPL_AUX_NA_PARAM(Predicate)
|
||||
>
|
||||
struct count_if
|
||||
: aux::msvc_eti_base< typename fold<
|
||||
: fold<
|
||||
Sequence
|
||||
, integral_c<unsigned long,0>
|
||||
, protect< aux::next_if<Predicate> >
|
||||
>::type >
|
||||
>::type
|
||||
{
|
||||
BOOST_MPL_AUX_LAMBDA_SUPPORT(2,count_if,(Sequence,Predicate))
|
||||
};
|
||||
|
@@ -14,10 +14,8 @@
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#include <boost/mpl/aux_/msvc_type.hpp>
|
||||
#include <boost/mpl/aux_/na_spec.hpp>
|
||||
#include <boost/mpl/aux_/lambda_support.hpp>
|
||||
#include <boost/mpl/aux_/config/eti.hpp>
|
||||
|
||||
namespace boost { namespace mpl {
|
||||
|
||||
@@ -26,11 +24,7 @@ template<
|
||||
>
|
||||
struct deref
|
||||
{
|
||||
#if !defined(BOOST_MPL_CFG_MSVC_70_ETI_BUG)
|
||||
typedef typename Iterator::type type;
|
||||
#else
|
||||
typedef typename aux::msvc_type<Iterator>::type type;
|
||||
#endif
|
||||
BOOST_MPL_AUX_LAMBDA_SUPPORT(1,deref,(Iterator))
|
||||
};
|
||||
|
||||
|
@@ -21,7 +21,6 @@
|
||||
#include <boost/mpl/next.hpp>
|
||||
#include <boost/mpl/tag.hpp>
|
||||
#include <boost/mpl/apply_wrap.hpp>
|
||||
#include <boost/mpl/aux_/msvc_eti_base.hpp>
|
||||
#include <boost/mpl/aux_/value_wknd.hpp>
|
||||
#include <boost/mpl/aux_/na_spec.hpp>
|
||||
#include <boost/mpl/aux_/config/forwarding.hpp>
|
||||
@@ -35,11 +34,11 @@ template< typename Tag > struct distance_impl
|
||||
{
|
||||
template< typename First, typename Last > struct apply
|
||||
#if !defined(BOOST_MPL_CFG_NO_NESTED_FORWARDING)
|
||||
: aux::msvc_eti_base< typename iter_fold<
|
||||
: iter_fold<
|
||||
iterator_range<First,Last>
|
||||
, mpl::long_<0>
|
||||
, next<>
|
||||
>::type >
|
||||
>::type
|
||||
{
|
||||
#else
|
||||
{
|
||||
|
@@ -28,7 +28,6 @@
|
||||
#include <boost/mpl/void.hpp>
|
||||
#include <boost/mpl/aux_/na_spec.hpp>
|
||||
#include <boost/mpl/aux_/lambda_support.hpp>
|
||||
#include <boost/mpl/aux_/msvc_eti_base.hpp>
|
||||
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
|
||||
@@ -98,9 +97,7 @@ template<
|
||||
, typename Predicate = is_same<_,_>
|
||||
>
|
||||
struct equal
|
||||
: aux::msvc_eti_base<
|
||||
typename aux::equal_impl<Sequence1,Sequence2,Predicate>::type
|
||||
>::type
|
||||
: aux::equal_impl<Sequence1,Sequence2,Predicate>::type
|
||||
{
|
||||
BOOST_MPL_AUX_LAMBDA_SUPPORT(2,equal,(Sequence1,Sequence2))
|
||||
};
|
||||
|
@@ -26,7 +26,6 @@
|
||||
#include <boost/mpl/aux_/has_begin.hpp>
|
||||
#include <boost/mpl/aux_/na_spec.hpp>
|
||||
#include <boost/mpl/aux_/lambda_support.hpp>
|
||||
#include <boost/mpl/aux_/config/eti.hpp>
|
||||
#include <boost/mpl/aux_/config/msvc.hpp>
|
||||
#include <boost/mpl/aux_/config/workaround.hpp>
|
||||
#if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
|
||||
@@ -98,12 +97,6 @@ struct is_sequence
|
||||
|
||||
#endif // BOOST_MSVC
|
||||
|
||||
#if defined(BOOST_MPL_CFG_MSVC_60_ETI_BUG)
|
||||
template<> struct is_sequence<int>
|
||||
: bool_<false>
|
||||
{
|
||||
};
|
||||
#endif
|
||||
|
||||
BOOST_MPL_AUX_NA_SPEC_NO_ETI(1, is_sequence)
|
||||
|
||||
|
@@ -15,10 +15,8 @@
|
||||
// $Revision$
|
||||
|
||||
#include <boost/mpl/integral_c.hpp>
|
||||
#include <boost/mpl/aux_/msvc_eti_base.hpp>
|
||||
#include <boost/mpl/aux_/na_spec.hpp>
|
||||
#include <boost/mpl/aux_/lambda_support.hpp>
|
||||
#include <boost/mpl/aux_/config/eti.hpp>
|
||||
#include <boost/mpl/aux_/config/integral.hpp>
|
||||
#include <boost/mpl/aux_/config/static_constant.hpp>
|
||||
|
||||
@@ -35,16 +33,9 @@ template<
|
||||
typename BOOST_MPL_AUX_NA_PARAM(N)
|
||||
>
|
||||
struct negate
|
||||
#if !defined(BOOST_MPL_CFG_MSVC_ETI_BUG)
|
||||
: negate_impl<
|
||||
typename negate_tag<N>::type
|
||||
>::template apply<N>::type
|
||||
#else
|
||||
: aux::msvc_eti_base< typename apply_wrap1<
|
||||
negate_impl< typename negate_tag<N>::type >
|
||||
, N
|
||||
>::type >::type
|
||||
#endif
|
||||
{
|
||||
BOOST_MPL_AUX_LAMBDA_SUPPORT(1, negate, (N))
|
||||
};
|
||||
|
@@ -14,10 +14,8 @@
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#include <boost/mpl/aux_/msvc_eti_base.hpp>
|
||||
#include <boost/mpl/aux_/na_spec.hpp>
|
||||
#include <boost/mpl/aux_/lambda_support.hpp>
|
||||
#include <boost/mpl/aux_/config/eti.hpp>
|
||||
|
||||
namespace boost { namespace mpl {
|
||||
|
||||
@@ -39,11 +37,7 @@ template<
|
||||
>
|
||||
struct first
|
||||
{
|
||||
#if !defined(BOOST_MPL_CFG_MSVC_70_ETI_BUG)
|
||||
typedef typename P::first type;
|
||||
#else
|
||||
typedef typename aux::msvc_eti_base<P>::first type;
|
||||
#endif
|
||||
BOOST_MPL_AUX_LAMBDA_SUPPORT(1,first,(P))
|
||||
};
|
||||
|
||||
@@ -52,11 +46,7 @@ template<
|
||||
>
|
||||
struct second
|
||||
{
|
||||
#if !defined(BOOST_MPL_CFG_MSVC_70_ETI_BUG)
|
||||
typedef typename P::second type;
|
||||
#else
|
||||
typedef typename aux::msvc_eti_base<P>::second type;
|
||||
#endif
|
||||
BOOST_MPL_AUX_LAMBDA_SUPPORT(1,second,(P))
|
||||
};
|
||||
|
||||
|
@@ -18,8 +18,6 @@
|
||||
#include <boost/mpl/aux_/has_tag.hpp>
|
||||
#include <boost/mpl/aux_/has_begin.hpp>
|
||||
#include <boost/mpl/aux_/na_spec.hpp>
|
||||
#include <boost/mpl/aux_/is_msvc_eti_arg.hpp>
|
||||
#include <boost/mpl/aux_/config/eti.hpp>
|
||||
#include <boost/mpl/aux_/yes_no.hpp>
|
||||
#include <boost/mpl/aux_/config/workaround.hpp>
|
||||
|
||||
@@ -27,8 +25,7 @@ namespace boost { namespace mpl {
|
||||
|
||||
// agurt, 27/nov/02: have to use a simplistic 'sequence_tag' implementation
|
||||
// on MSVC to avoid dreadful "internal structure overflow" error
|
||||
#if BOOST_WORKAROUND(BOOST_MSVC, < 1300) \
|
||||
|| defined(BOOST_MPL_CFG_NO_HAS_XXX)
|
||||
#if defined(BOOST_MPL_CFG_NO_HAS_XXX)
|
||||
|
||||
template<
|
||||
typename BOOST_MPL_AUX_NA_PARAM(Sequence)
|
||||
@@ -38,41 +35,6 @@ struct sequence_tag
|
||||
typedef typename Sequence::tag type;
|
||||
};
|
||||
|
||||
#elif BOOST_WORKAROUND(BOOST_MSVC, == 1300)
|
||||
|
||||
// agurt, 07/feb/03: workaround for what seems to be MSVC 7.0-specific ETI issue
|
||||
|
||||
namespace aux {
|
||||
|
||||
template< bool >
|
||||
struct sequence_tag_impl
|
||||
{
|
||||
template< typename Sequence > struct result_
|
||||
{
|
||||
typedef typename Sequence::tag type;
|
||||
};
|
||||
};
|
||||
|
||||
template<>
|
||||
struct sequence_tag_impl<false>
|
||||
{
|
||||
template< typename Sequence > struct result_
|
||||
{
|
||||
typedef int type;
|
||||
};
|
||||
};
|
||||
|
||||
} // namespace aux
|
||||
|
||||
template<
|
||||
typename BOOST_MPL_AUX_NA_PARAM(Sequence)
|
||||
>
|
||||
struct sequence_tag
|
||||
: aux::sequence_tag_impl< !aux::is_msvc_eti_arg<Sequence>::value >
|
||||
::template result_<Sequence>
|
||||
{
|
||||
};
|
||||
|
||||
#else
|
||||
|
||||
namespace aux {
|
||||
|
@@ -19,7 +19,6 @@
|
||||
#include <boost/mpl/aux_/size_impl.hpp>
|
||||
#include <boost/mpl/aux_/na_spec.hpp>
|
||||
#include <boost/mpl/aux_/lambda_support.hpp>
|
||||
#include <boost/mpl/aux_/msvc_eti_base.hpp>
|
||||
|
||||
namespace boost { namespace mpl {
|
||||
|
||||
@@ -27,10 +26,8 @@ template<
|
||||
typename BOOST_MPL_AUX_NA_PARAM(Sequence)
|
||||
>
|
||||
struct size
|
||||
: aux::msvc_eti_base<
|
||||
typename size_impl< typename sequence_tag<Sequence>::type >
|
||||
::template apply< Sequence >::type
|
||||
>::type
|
||||
: size_impl< typename sequence_tag<Sequence>::type >
|
||||
::template apply< Sequence >::type
|
||||
{
|
||||
BOOST_MPL_AUX_LAMBDA_SUPPORT(1, size, (Sequence))
|
||||
};
|
||||
|
@@ -17,7 +17,6 @@
|
||||
#include <boost/mpl/eval_if.hpp>
|
||||
#include <boost/mpl/void.hpp>
|
||||
#include <boost/mpl/aux_/has_tag.hpp>
|
||||
#include <boost/mpl/aux_/config/eti.hpp>
|
||||
|
||||
namespace boost { namespace mpl {
|
||||
|
||||
@@ -29,22 +28,12 @@ template< typename T > struct tag_impl
|
||||
}
|
||||
|
||||
template< typename T, typename Default = void_ > struct tag
|
||||
#if !defined(BOOST_MPL_CFG_MSVC_ETI_BUG)
|
||||
: if_<
|
||||
aux::has_tag<T>
|
||||
, aux::tag_impl<T>
|
||||
, Default
|
||||
>::type
|
||||
{
|
||||
#else
|
||||
{
|
||||
typedef typename eval_if<
|
||||
aux::has_tag<T>
|
||||
, aux::tag_impl<T>
|
||||
, Default
|
||||
>::type type;
|
||||
|
||||
#endif
|
||||
};
|
||||
|
||||
}}
|
||||
|
Reference in New Issue
Block a user