Fixed phoenix V2 includes

git-svn-id: https://svn.code.sf.net/p/turtle/code/trunk@750 860be788-9bd5-4423-9f1e-828f051e677b
This commit is contained in:
mat007 2014-05-29 12:22:36 +00:00
parent 2a84a7f9c7
commit 939ca29fb0
4 changed files with 17 additions and 4 deletions

View file

@ -12,7 +12,11 @@
#pragma warning( push, 0 ) #pragma warning( push, 0 )
#endif #endif
#include <boost/lambda/lambda.hpp> #include <boost/lambda/lambda.hpp>
# ifdef BOOST_PHOENIX_USE_V2_OVER_V3
#include <boost/spirit/home/phoenix.hpp>
# else
#include <boost/phoenix/phoenix.hpp> #include <boost/phoenix/phoenix.hpp>
# endif
#ifdef BOOST_MSVC #ifdef BOOST_MSVC
#pragma warning( pop ) #pragma warning( pop )
#endif #endif

View file

@ -15,15 +15,20 @@
#ifdef BOOST_MSVC #ifdef BOOST_MSVC
#pragma warning( push, 0 ) #pragma warning( push, 0 )
#endif #endif
# ifdef BOOST_PHOENIX_USE_V2_OVER_V3
#include <boost/spirit/home/phoenix.hpp>
#include <boost/spirit/home/phoenix/bind.hpp>
# else
#include <boost/phoenix/phoenix.hpp> #include <boost/phoenix/phoenix.hpp>
#include <boost/phoenix/bind.hpp> #include <boost/phoenix/bind.hpp>
#ifndef BOOST_MSVC // this produces an ICE with all versions of MSVC
#include <boost/lambda/bind.hpp>
#include <boost/lambda/lambda.hpp>
# endif # endif
#ifdef BOOST_MSVC #ifdef BOOST_MSVC
#pragma warning( pop ) #pragma warning( pop )
#endif #endif
#ifndef BOOST_MSVC // this produces an ICE with all versions of MSVC
#include <boost/lambda/bind.hpp>
#include <boost/lambda/lambda.hpp>
#endif
#include <boost/bind.hpp> #include <boost/bind.hpp>
#include <vector> #include <vector>
#include <deque> #include <deque>

View file

@ -22,7 +22,6 @@
# define MOCK_MAX_ARGS 9 # define MOCK_MAX_ARGS 9
#elif BOOST_PP_LESS(9, MOCK_MAX_ARGS) #elif BOOST_PP_LESS(9, MOCK_MAX_ARGS)
# define MOCK_USE_BOOST_PHOENIX # define MOCK_USE_BOOST_PHOENIX
# define BOOST_PHOENIX_USE_V2_OVER_V3
#endif #endif
#ifndef MOCK_MAX_SEQUENCES #ifndef MOCK_MAX_SEQUENCES
@ -42,6 +41,7 @@
#endif #endif
#ifdef MOCK_USE_BOOST_PHOENIX #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 # ifndef BOOST_RESULT_OF_NUM_ARGS
# define BOOST_RESULT_OF_NUM_ARGS MOCK_MAX_ARGS # define BOOST_RESULT_OF_NUM_ARGS MOCK_MAX_ARGS
# elif BOOST_PP_LESS(BOOST_RESULT_OF_NUM_ARGS, MOCK_MAX_ARGS) # elif BOOST_PP_LESS(BOOST_RESULT_OF_NUM_ARGS, MOCK_MAX_ARGS)

View file

@ -11,7 +11,11 @@
#include "../config.hpp" #include "../config.hpp"
#ifdef MOCK_USE_BOOST_PHOENIX #ifdef MOCK_USE_BOOST_PHOENIX
# ifdef BOOST_PHOENIX_USE_V2_OVER_V3
#include <boost/spirit/home/phoenix/bind.hpp>
# else
#include <boost/phoenix/bind.hpp> #include <boost/phoenix/bind.hpp>
# endif
#else #else
#include <boost/bind.hpp> #include <boost/bind.hpp>
#endif #endif