From 939ca29fb02803c1875359a6eec8ebeb4c6b4a29 Mon Sep 17 00:00:00 2001 From: mat007 Date: Thu, 29 May 2014 12:22:36 +0000 Subject: [PATCH] Fixed phoenix V2 includes git-svn-id: https://svn.code.sf.net/p/turtle/code/trunk@750 860be788-9bd5-4423-9f1e-828f051e677b --- test/detail/test_is_functor.cpp | 4 ++++ test/test_log.cpp | 11 ++++++++--- turtle/config.hpp | 2 +- turtle/detail/lambda.hpp | 4 ++++ 4 files changed, 17 insertions(+), 4 deletions(-) diff --git a/test/detail/test_is_functor.cpp b/test/detail/test_is_functor.cpp index ea357c2..bfc5550 100644 --- a/test/detail/test_is_functor.cpp +++ b/test/detail/test_is_functor.cpp @@ -12,7 +12,11 @@ #pragma warning( push, 0 ) #endif #include +# ifdef BOOST_PHOENIX_USE_V2_OVER_V3 +#include +# else #include +# endif #ifdef BOOST_MSVC #pragma warning( pop ) #endif diff --git a/test/test_log.cpp b/test/test_log.cpp index 6722c44..9b6f6df 100644 --- a/test/test_log.cpp +++ b/test/test_log.cpp @@ -15,15 +15,20 @@ #ifdef BOOST_MSVC #pragma warning( push, 0 ) #endif +# ifdef BOOST_PHOENIX_USE_V2_OVER_V3 +#include +#include +# else #include #include +# endif +#ifdef BOOST_MSVC +#pragma warning( pop ) +#endif #ifndef BOOST_MSVC // this produces an ICE with all versions of MSVC #include #include #endif -#ifdef BOOST_MSVC -#pragma warning( pop ) -#endif #include #include #include diff --git a/turtle/config.hpp b/turtle/config.hpp index b1262b2..b9b5940 100644 --- a/turtle/config.hpp +++ b/turtle/config.hpp @@ -22,7 +22,6 @@ # define MOCK_MAX_ARGS 9 #elif BOOST_PP_LESS(9, MOCK_MAX_ARGS) # define MOCK_USE_BOOST_PHOENIX -# define BOOST_PHOENIX_USE_V2_OVER_V3 #endif #ifndef MOCK_MAX_SEQUENCES @@ -42,6 +41,7 @@ #endif #ifdef MOCK_USE_BOOST_PHOENIX +# define BOOST_PHOENIX_USE_V2_OVER_V3 // V3 doesn't work due to various bugs including https://svn.boost.org/trac/boost/ticket/8504 # ifndef BOOST_RESULT_OF_NUM_ARGS # define BOOST_RESULT_OF_NUM_ARGS MOCK_MAX_ARGS # elif BOOST_PP_LESS(BOOST_RESULT_OF_NUM_ARGS, MOCK_MAX_ARGS) diff --git a/turtle/detail/lambda.hpp b/turtle/detail/lambda.hpp index 4ee35d7..4678a6b 100644 --- a/turtle/detail/lambda.hpp +++ b/turtle/detail/lambda.hpp @@ -11,7 +11,11 @@ #include "../config.hpp" #ifdef MOCK_USE_BOOST_PHOENIX +# ifdef BOOST_PHOENIX_USE_V2_OVER_V3 +#include +# else #include +# endif #else #include #endif