From 5980a45b3016adb80b5f11c3bb44ad290e62f8de Mon Sep 17 00:00:00 2001 From: Aleksey Gurtovoy Date: Sat, 11 Oct 2008 06:06:10 +0000 Subject: [PATCH] Merged revisions 49228 via svnmerge from https://svn.boost.org/svn/boost/trunk ........ r49228 | nmusatti | 2008-10-09 17:06:06 -0500 (Thu, 09 Oct 2008) | 1 line Applied patch from ticket #2345 ........ [SVN r49266] --- include/boost/mpl/apply_wrap.hpp | 27 +++++++++++++++++++ include/boost/mpl/assert.hpp | 6 ++--- include/boost/mpl/aux_/config/adl.hpp | 2 +- include/boost/mpl/aux_/config/arrays.hpp | 2 +- include/boost/mpl/aux_/config/bind.hpp | 2 +- include/boost/mpl/aux_/config/compiler.hpp | 2 +- include/boost/mpl/aux_/config/dtp.hpp | 4 +-- include/boost/mpl/aux_/config/forwarding.hpp | 2 +- include/boost/mpl/aux_/config/integral.hpp | 2 +- include/boost/mpl/aux_/config/operators.hpp | 2 +- .../boost/mpl/aux_/config/preprocessor.hpp | 2 +- include/boost/mpl/aux_/config/ttp.hpp | 2 +- include/boost/mpl/aux_/has_rebind.hpp | 4 +-- include/boost/mpl/aux_/lambda_support.hpp | 2 +- include/boost/mpl/lower_bound.hpp | 2 +- include/boost/mpl/quote.hpp | 15 ++++++++--- include/boost/mpl/upper_bound.hpp | 2 +- 17 files changed, 58 insertions(+), 22 deletions(-) diff --git a/include/boost/mpl/apply_wrap.hpp b/include/boost/mpl/apply_wrap.hpp index dc8f8f2..b786af0 100644 --- a/include/boost/mpl/apply_wrap.hpp +++ b/include/boost/mpl/apply_wrap.hpp @@ -177,6 +177,31 @@ struct BOOST_PP_CAT(apply_wrap,i_) # define j_ BOOST_PP_FRAME_ITERATION(2) +#if (i_ == 0) && (j_ == 0) && BOOST_WORKAROUND( __BORLANDC__, >= 0x590) && !defined( BOOST_MPL_CFG_NO_HAS_APPLY) + +template< typename F, bool F_has_apply > +struct apply_wrap_impl0_bcb { + typedef typename F::template apply< na > type; +}; + +template< typename F > +struct apply_wrap_impl0_bcb< F, true > { + typedef typename F::apply type; +}; + +template< + typename F BOOST_PP_COMMA_IF(i_) AUX778076_APPLY_WRAP_PARAMS(i_, typename T) + > +struct BOOST_PP_CAT(apply_wrap_impl,i_)< + BOOST_MPL_PP_ADD(i_, j_) + , F + BOOST_PP_COMMA_IF(i_) AUX778076_APPLY_WRAP_PARAMS(i_, T) + > +{ + typedef apply_wrap_impl0_bcb< F, aux::has_apply< F >::value >::type type; +}; +#else + template< typename F BOOST_PP_COMMA_IF(i_) AUX778076_APPLY_WRAP_PARAMS(i_, typename T) > @@ -198,6 +223,8 @@ struct BOOST_PP_CAT(apply_wrap_impl,i_)< > type; }; +#endif + # undef j_ #endif // BOOST_PP_ITERATION_DEPTH() diff --git a/include/boost/mpl/assert.hpp b/include/boost/mpl/assert.hpp index 7ff190b..4bcd531 100644 --- a/include/boost/mpl/assert.hpp +++ b/include/boost/mpl/assert.hpp @@ -35,7 +35,7 @@ #include -#if BOOST_WORKAROUND(__BORLANDC__, >= 0x560) && BOOST_WORKAROUND(__BORLANDC__, < 0x600) \ +#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) \ || (BOOST_MPL_CFG_GCC != 0) \ || BOOST_WORKAROUND(__IBMCPP__, <= 600) # define BOOST_MPL_CFG_ASSERT_USE_RELATION_NAMES @@ -43,7 +43,7 @@ #if BOOST_WORKAROUND(__MWERKS__, < 0x3202) \ || BOOST_WORKAROUND(__EDG_VERSION__, <= 238) \ - || BOOST_WORKAROUND(__BORLANDC__, < 0x600) \ + || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) \ || BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x840)) # define BOOST_MPL_CFG_ASSERT_BROKEN_POINTER_TO_POINTER_TO_MEMBER #endif @@ -51,7 +51,7 @@ // agurt, 10/nov/06: use enums for Borland (which cannot cope with static constants) // and GCC (which issues "unused variable" warnings when static constants are used // at a function scope) -#if BOOST_WORKAROUND(__BORLANDC__, < 0x600) \ +#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) \ || (BOOST_MPL_CFG_GCC != 0) # define BOOST_MPL_AUX_ASSERT_CONSTANT(T, expr) enum { expr } #else diff --git a/include/boost/mpl/aux_/config/adl.hpp b/include/boost/mpl/aux_/config/adl.hpp index c804d85..68ffcee 100644 --- a/include/boost/mpl/aux_/config/adl.hpp +++ b/include/boost/mpl/aux_/config/adl.hpp @@ -27,7 +27,7 @@ #if !defined(BOOST_MPL_CFG_NO_ADL_BARRIER_NAMESPACE) \ && ( BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1400)) \ - || BOOST_WORKAROUND(__BORLANDC__, < 0x600) \ + || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) \ || BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x840)) \ || BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3202)) \ || BOOST_WORKAROUND(BOOST_INTEL_CXX_VERSION, BOOST_TESTED_AT(810)) \ diff --git a/include/boost/mpl/aux_/config/arrays.hpp b/include/boost/mpl/aux_/config/arrays.hpp index 7ca9048..01b8626 100644 --- a/include/boost/mpl/aux_/config/arrays.hpp +++ b/include/boost/mpl/aux_/config/arrays.hpp @@ -19,7 +19,7 @@ #if !defined(BOOST_MPL_CFG_NO_DEPENDENT_ARRAY_TYPES) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) \ - && ( BOOST_WORKAROUND(__BORLANDC__, < 0x600) \ + && ( BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) \ || BOOST_WORKAROUND(BOOST_MSVC, <= 1300) \ ) diff --git a/include/boost/mpl/aux_/config/bind.hpp b/include/boost/mpl/aux_/config/bind.hpp index 653b88e..0daa25c 100644 --- a/include/boost/mpl/aux_/config/bind.hpp +++ b/include/boost/mpl/aux_/config/bind.hpp @@ -21,7 +21,7 @@ #if !defined(BOOST_MPL_CFG_NO_BIND_TEMPLATE) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) \ && ( BOOST_WORKAROUND(BOOST_MSVC, <= 1300) \ - || BOOST_WORKAROUND(__BORLANDC__, < 0x600) \ + || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) \ ) # define BOOST_MPL_CFG_NO_BIND_TEMPLATE diff --git a/include/boost/mpl/aux_/config/compiler.hpp b/include/boost/mpl/aux_/config/compiler.hpp index bb7b289..619ddc8 100644 --- a/include/boost/mpl/aux_/config/compiler.hpp +++ b/include/boost/mpl/aux_/config/compiler.hpp @@ -32,7 +32,7 @@ # elif BOOST_WORKAROUND(BOOST_MPL_CFG_GCC, BOOST_TESTED_AT(0x0304)) # define BOOST_MPL_CFG_COMPILER_DIR gcc -# elif BOOST_WORKAROUND(__BORLANDC__, < 0x600) +# elif BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) # if !defined(BOOST_MPL_CFG_NO_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES) # define BOOST_MPL_CFG_COMPILER_DIR bcc551 # else diff --git a/include/boost/mpl/aux_/config/dtp.hpp b/include/boost/mpl/aux_/config/dtp.hpp index 568bef6..802bf13 100644 --- a/include/boost/mpl/aux_/config/dtp.hpp +++ b/include/boost/mpl/aux_/config/dtp.hpp @@ -25,7 +25,7 @@ #if !defined(BOOST_MPL_CFG_NO_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) \ && BOOST_WORKAROUND(__BORLANDC__, >= 0x560) \ - && BOOST_WORKAROUND(__BORLANDC__, < 0x600) + && BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) # define BOOST_MPL_CFG_NO_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES @@ -35,7 +35,7 @@ #if !defined(BOOST_MPL_CFG_BROKEN_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) \ && ( BOOST_WORKAROUND(__MWERKS__, <= 0x3001) \ - || BOOST_WORKAROUND(__BORLANDC__, < 0x600) \ + || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) \ || defined(BOOST_MPL_CFG_NO_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES) \ ) diff --git a/include/boost/mpl/aux_/config/forwarding.hpp b/include/boost/mpl/aux_/config/forwarding.hpp index cbf7e4f..c169858 100644 --- a/include/boost/mpl/aux_/config/forwarding.hpp +++ b/include/boost/mpl/aux_/config/forwarding.hpp @@ -18,7 +18,7 @@ #if !defined(BOOST_MPL_CFG_NO_NESTED_FORWARDING) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) \ - && BOOST_WORKAROUND(__BORLANDC__, < 0x600) + && BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) # define BOOST_MPL_CFG_NO_NESTED_FORWARDING diff --git a/include/boost/mpl/aux_/config/integral.hpp b/include/boost/mpl/aux_/config/integral.hpp index bfaafca..3f3f0d0 100644 --- a/include/boost/mpl/aux_/config/integral.hpp +++ b/include/boost/mpl/aux_/config/integral.hpp @@ -19,7 +19,7 @@ #if !defined(BOOST_MPL_CFG_BCC_INTEGRAL_CONSTANTS) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) \ - && BOOST_WORKAROUND(__BORLANDC__, < 0x600) + && BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) # define BOOST_MPL_CFG_BCC_INTEGRAL_CONSTANTS diff --git a/include/boost/mpl/aux_/config/operators.hpp b/include/boost/mpl/aux_/config/operators.hpp index 66262a8..1806179 100644 --- a/include/boost/mpl/aux_/config/operators.hpp +++ b/include/boost/mpl/aux_/config/operators.hpp @@ -20,7 +20,7 @@ #if !defined(BOOST_MPL_CFG_USE_OPERATORS_OVERLOADING) \ && ( BOOST_WORKAROUND(BOOST_MSVC, <= 1300) \ - || BOOST_WORKAROUND(__BORLANDC__, <= 0x600) \ + || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) \ || BOOST_WORKAROUND(__EDG_VERSION__, <= 245) \ || BOOST_WORKAROUND(BOOST_MPL_CFG_GCC, <= 0x0295) \ || BOOST_WORKAROUND(__IBMCPP__, BOOST_TESTED_AT(600)) \ diff --git a/include/boost/mpl/aux_/config/preprocessor.hpp b/include/boost/mpl/aux_/config/preprocessor.hpp index 0acd76e..332dd60 100644 --- a/include/boost/mpl/aux_/config/preprocessor.hpp +++ b/include/boost/mpl/aux_/config/preprocessor.hpp @@ -18,7 +18,7 @@ #if !defined(BOOST_MPL_CFG_BROKEN_PP_MACRO_EXPANSION) \ && ( BOOST_WORKAROUND(__MWERKS__, <= 0x3003) \ - || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x561)) \ + || BOOST_WORKAROUND(__BORLANDC__, < 0x582) \ || BOOST_WORKAROUND(__IBMCPP__, BOOST_TESTED_AT(502)) \ ) diff --git a/include/boost/mpl/aux_/config/ttp.hpp b/include/boost/mpl/aux_/config/ttp.hpp index c614738..2c5d649 100644 --- a/include/boost/mpl/aux_/config/ttp.hpp +++ b/include/boost/mpl/aux_/config/ttp.hpp @@ -31,7 +31,7 @@ #if !defined(BOOST_MPL_CFG_EXTENDED_TEMPLATE_PARAMETERS_MATCHING) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) \ && ( BOOST_WORKAROUND(BOOST_MPL_CFG_GCC, BOOST_TESTED_AT(0x0302)) \ - || BOOST_WORKAROUND(__BORLANDC__, < 0x600) \ + || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) \ ) # define BOOST_MPL_CFG_EXTENDED_TEMPLATE_PARAMETERS_MATCHING diff --git a/include/boost/mpl/aux_/has_rebind.hpp b/include/boost/mpl/aux_/has_rebind.hpp index 1643820..251323d 100644 --- a/include/boost/mpl/aux_/has_rebind.hpp +++ b/include/boost/mpl/aux_/has_rebind.hpp @@ -25,7 +25,7 @@ # include # include # include -#elif BOOST_WORKAROUND(__BORLANDC__, < 0x600) +#elif BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) # include # include # include @@ -62,7 +62,7 @@ struct has_rebind template< typename T > struct has_rebind_tag {}; no_tag operator|(has_rebind_tag, void const volatile*); -# if !BOOST_WORKAROUND(__BORLANDC__, < 0x600) +# if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) template< typename T > struct has_rebind { diff --git a/include/boost/mpl/aux_/lambda_support.hpp b/include/boost/mpl/aux_/lambda_support.hpp index 23b47cd..5b3ead4 100644 --- a/include/boost/mpl/aux_/lambda_support.hpp +++ b/include/boost/mpl/aux_/lambda_support.hpp @@ -110,7 +110,7 @@ template< typename T > struct has_rebind_tag; typedef BOOST_PP_CAT(name,_rebind) rebind; \ /**/ -#if BOOST_WORKAROUND(__BORLANDC__, < 0x600) +#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) # define BOOST_MPL_AUX_LAMBDA_SUPPORT_HAS_REBIND(i, name, params) \ template< BOOST_MPL_PP_PARAMS(i,typename T) > \ ::boost::mpl::aux::yes_tag operator|( \ diff --git a/include/boost/mpl/lower_bound.hpp b/include/boost/mpl/lower_bound.hpp index 1b39c56..e067d6e 100644 --- a/include/boost/mpl/lower_bound.hpp +++ b/include/boost/mpl/lower_bound.hpp @@ -19,7 +19,7 @@ #include #include -#if BOOST_WORKAROUND(__BORLANDC__, < 0x600) +#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) # define BOOST_MPL_CFG_STRIPPED_DOWN_LOWER_BOUND_IMPL #endif diff --git a/include/boost/mpl/quote.hpp b/include/boost/mpl/quote.hpp index 5c9532e..5fa8b5e 100644 --- a/include/boost/mpl/quote.hpp +++ b/include/boost/mpl/quote.hpp @@ -25,7 +25,7 @@ #include -#if defined(BOOST_MPL_CFG_NO_TEMPLATE_TEMPLATE_PARAMETERS) +#if defined(BOOST_MPL_CFG_NO_TEMPLATE_TEMPLATE_PARAMETERS) && !BOOST_WORKAROUND( __BORLANDC__, >=0x590 ) # define BOOST_MPL_CFG_NO_QUOTE_TEMPLATE #endif @@ -123,17 +123,26 @@ template< struct BOOST_PP_CAT(quote,i_) { template< BOOST_MPL_PP_PARAMS(i_, typename U) > struct apply -#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) +#if BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT( 0x590 )) + { + typedef typename quote_impl< + F< BOOST_MPL_PP_PARAMS(i_, U) > + , aux::has_type< F< BOOST_MPL_PP_PARAMS(i_, U) > >::value + >::type type; + }; +#elif !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) : quote_impl< F< BOOST_MPL_PP_PARAMS(i_, U) > , aux::has_type< F< BOOST_MPL_PP_PARAMS(i_, U) > >::value > + { + }; #else : quote_impl< aux::has_type< F< BOOST_MPL_PP_PARAMS(i_, U) > >::value > ::template result_< F< BOOST_MPL_PP_PARAMS(i_, U) > > -#endif { }; +#endif }; #undef i_ diff --git a/include/boost/mpl/upper_bound.hpp b/include/boost/mpl/upper_bound.hpp index 6d92981..1b83e23 100644 --- a/include/boost/mpl/upper_bound.hpp +++ b/include/boost/mpl/upper_bound.hpp @@ -19,7 +19,7 @@ #include #include -#if BOOST_WORKAROUND(__BORLANDC__, < 0x600) +#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) # define BOOST_MPL_CFG_STRIPPED_DOWN_UPPER_BOUND_IMPL #endif