From 51adb2aa8d506bc0e76103e63c4df485a401179d Mon Sep 17 00:00:00 2001 From: "Ralf W. Grosse-Kunstleve" Date: Thu, 25 Sep 2008 04:49:24 +0000 Subject: [PATCH] boost/python, boost/mpl: gcc 4.4 compatibility (see http://svn.boost.org/trac/boost/ticket/2069) [SVN r48960] --- include/boost/mpl/apply.hpp | 6 +++++- include/boost/mpl/apply_wrap.hpp | 6 +++++- include/boost/mpl/aux_/advance_backward.hpp | 6 +++++- include/boost/mpl/aux_/advance_forward.hpp | 6 +++++- include/boost/mpl/aux_/full_lambda.hpp | 6 +++++- include/boost/mpl/aux_/numeric_op.hpp | 6 +++++- include/boost/mpl/bind.hpp | 6 +++++- include/boost/mpl/unpack_args.hpp | 6 +++++- 8 files changed, 40 insertions(+), 8 deletions(-) diff --git a/include/boost/mpl/apply.hpp b/include/boost/mpl/apply.hpp index 345344e..3963a78 100644 --- a/include/boost/mpl/apply.hpp +++ b/include/boost/mpl/apply.hpp @@ -135,7 +135,10 @@ struct apply ///// iteration, depth == 1 -#elif BOOST_PP_ITERATION_DEPTH() == 1 +// For gcc 4.4 compatability, we must include the +// BOOST_PP_ITERATION_DEPTH test inside an #else clause. +#else // BOOST_PP_IS_ITERATING +#if BOOST_PP_ITERATION_DEPTH() == 1 # define i_ BOOST_PP_FRAME_ITERATION(1) @@ -222,4 +225,5 @@ struct apply_chooser # undef i_ +#endif // BOOST_PP_ITERATION_DEPTH() #endif // BOOST_PP_IS_ITERATING diff --git a/include/boost/mpl/apply_wrap.hpp b/include/boost/mpl/apply_wrap.hpp index 355a8f1..dc8f8f2 100644 --- a/include/boost/mpl/apply_wrap.hpp +++ b/include/boost/mpl/apply_wrap.hpp @@ -78,7 +78,10 @@ namespace boost { namespace mpl { ///// iteration, depth == 1 -#elif BOOST_PP_ITERATION_DEPTH() == 1 +// For gcc 4.4 compatability, we must include the +// BOOST_PP_ITERATION_DEPTH test inside an #else clause. +#else // BOOST_PP_IS_ITERATING +#if BOOST_PP_ITERATION_DEPTH() == 1 # define i_ BOOST_PP_FRAME_ITERATION(1) @@ -197,4 +200,5 @@ struct BOOST_PP_CAT(apply_wrap_impl,i_)< # undef j_ +#endif // BOOST_PP_ITERATION_DEPTH() #endif // BOOST_PP_IS_ITERATING diff --git a/include/boost/mpl/aux_/advance_backward.hpp b/include/boost/mpl/aux_/advance_backward.hpp index df8996d..306c4ed 100644 --- a/include/boost/mpl/aux_/advance_backward.hpp +++ b/include/boost/mpl/aux_/advance_backward.hpp @@ -79,7 +79,10 @@ struct advance_backward ///// iteration, depth == 1 -#elif BOOST_PP_ITERATION_DEPTH() == 1 +// For gcc 4.4 compatability, we must include the +// BOOST_PP_ITERATION_DEPTH test inside an #else clause. +#else // BOOST_PP_IS_ITERATING +#if BOOST_PP_ITERATION_DEPTH() == 1 #define i_ BOOST_PP_FRAME_ITERATION(1) template<> @@ -121,4 +124,5 @@ struct advance_backward< BOOST_PP_FRAME_ITERATION(1) > # undef AUX778076_ITER_1 # undef AUX778076_ITER_0 +#endif // BOOST_PP_ITERATION_DEPTH() #endif // BOOST_PP_IS_ITERATING diff --git a/include/boost/mpl/aux_/advance_forward.hpp b/include/boost/mpl/aux_/advance_forward.hpp index ad9240f..ad94ee1 100644 --- a/include/boost/mpl/aux_/advance_forward.hpp +++ b/include/boost/mpl/aux_/advance_forward.hpp @@ -79,7 +79,10 @@ struct advance_forward ///// iteration, depth == 1 -#elif BOOST_PP_ITERATION_DEPTH() == 1 +// For gcc 4.4 compatability, we must include the +// BOOST_PP_ITERATION_DEPTH test inside an #else clause. +#else // BOOST_PP_IS_ITERATING +#if BOOST_PP_ITERATION_DEPTH() == 1 #define i_ BOOST_PP_FRAME_ITERATION(1) template<> @@ -120,4 +123,5 @@ struct advance_forward< BOOST_PP_FRAME_ITERATION(1) > # undef AUX778076_ITER_1 # undef AUX778076_ITER_0 +#endif // BOOST_PP_ITERATION_DEPTH() #endif // BOOST_PP_IS_ITERATING diff --git a/include/boost/mpl/aux_/full_lambda.hpp b/include/boost/mpl/aux_/full_lambda.hpp index 745e6cd..c16940e 100644 --- a/include/boost/mpl/aux_/full_lambda.hpp +++ b/include/boost/mpl/aux_/full_lambda.hpp @@ -227,7 +227,10 @@ BOOST_MPL_AUX_NA_SPEC2(2, 3, lambda) ///// iteration, depth == 1 -#elif BOOST_PP_ITERATION_DEPTH() == 1 +// For gcc 4.4 compatability, we must include the +// BOOST_PP_ITERATION_DEPTH test inside an #else clause. +#else // BOOST_PP_IS_ITERATING +#if BOOST_PP_ITERATION_DEPTH() == 1 #define i_ BOOST_PP_FRAME_ITERATION(1) #if i_ > 0 @@ -347,4 +350,5 @@ struct lambda< }; #undef i_ +#endif // BOOST_PP_ITERATION_DEPTH() #endif // BOOST_PP_IS_ITERATING diff --git a/include/boost/mpl/aux_/numeric_op.hpp b/include/boost/mpl/aux_/numeric_op.hpp index ff76a09..3325821 100644 --- a/include/boost/mpl/aux_/numeric_op.hpp +++ b/include/boost/mpl/aux_/numeric_op.hpp @@ -287,7 +287,10 @@ BOOST_MPL_AUX_NA_SPEC2(2, AUX778076_OP_ARITY, AUX778076_OP_NAME) ///// iteration, depth == 1 -#elif BOOST_PP_ITERATION_DEPTH() == 1 +// For gcc 4.4 compatability, we must include the +// BOOST_PP_ITERATION_DEPTH test inside an #else clause. +#else // BOOST_PP_IS_ITERATING +#if BOOST_PP_ITERATION_DEPTH() == 1 # define i_ BOOST_PP_FRAME_ITERATION(1) @@ -308,4 +311,5 @@ struct AUX778076_OP_NAME # undef i_ +#endif // BOOST_PP_ITERATION_DEPTH() #endif // BOOST_PP_IS_ITERATING diff --git a/include/boost/mpl/bind.hpp b/include/boost/mpl/bind.hpp index 6e396b6..2ad0a3f 100644 --- a/include/boost/mpl/bind.hpp +++ b/include/boost/mpl/bind.hpp @@ -361,7 +361,10 @@ BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC( ///// iteration, depth == 1 -#elif BOOST_PP_ITERATION_DEPTH() == 1 +// For gcc 4.4 compatability, we must include the +// BOOST_PP_ITERATION_DEPTH test inside an #else clause. +#else // BOOST_PP_IS_ITERATING +#if BOOST_PP_ITERATION_DEPTH() == 1 # define i_ BOOST_PP_FRAME_ITERATION(1) @@ -544,4 +547,5 @@ struct bind_chooser # endif # undef j_ +#endif // BOOST_PP_ITERATION_DEPTH() #endif // BOOST_PP_IS_ITERATING diff --git a/include/boost/mpl/unpack_args.hpp b/include/boost/mpl/unpack_args.hpp index 1a0880a..ab25d98 100644 --- a/include/boost/mpl/unpack_args.hpp +++ b/include/boost/mpl/unpack_args.hpp @@ -111,7 +111,10 @@ BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(1, unpack_args) ///// iteration, depth == 1 -#elif BOOST_PP_ITERATION_DEPTH() == 1 +// For gcc 4.4 compatability, we must include the +// BOOST_PP_ITERATION_DEPTH test inside an #else clause. +#else // BOOST_PP_IS_ITERATING +#if BOOST_PP_ITERATION_DEPTH() == 1 # define i_ BOOST_PP_FRAME_ITERATION(1) @@ -143,4 +146,5 @@ template<> struct unpack_args_impl # undef i_ +#endif // BOOST_PP_ITERATION_DEPTH() #endif // BOOST_PP_IS_ITERATING