Continue gradually replacing Boost.Lambda with Boost.Phoenix.

For some reason, after the upgrade to Boost 1.57, gcc 4.6.3 has trouble with
the boost::lambda::_1 usage in stringize.h. This is consistent with other
cases we've encountered in which Boost.Lambda appears to be unmaintained and
losing its compatibility with other libraries. Fortunately Phoenix provides a
functional equivalent, albeit spelled differently.
master
Nat Goodspeed 2015-01-16 19:54:35 +00:00
parent 85b5036285
commit feb341d37c
1 changed files with 3 additions and 3 deletions

View File

@ -30,7 +30,7 @@
#define LL_STRINGIZE_H
#include <sstream>
#include <boost/lambda/lambda.hpp>
#include <boost/phoenix/phoenix.hpp>
#include <llstring.h>
/**
@ -108,7 +108,7 @@ std::string stringize_f(Functor const & f)
* return out.str();
* @endcode
*/
#define STRINGIZE(EXPRESSION) (stringize_f(boost::lambda::_1 << EXPRESSION))
#define STRINGIZE(EXPRESSION) (stringize_f(boost::phoenix::placeholders::arg1 << EXPRESSION))
/**
@ -144,7 +144,7 @@ void destringize_f(std::string const & str, Functor const & f)
* in >> item1 >> item2 >> item3 ... ;
* @endcode
*/
#define DESTRINGIZE(STR, EXPRESSION) (destringize_f((STR), (boost::lambda::_1 >> EXPRESSION)))
#define DESTRINGIZE(STR, EXPRESSION) (destringize_f((STR), (boost::phoenix::placeholders::arg1 >> EXPRESSION)))
#endif /* ! defined(LL_STRINGIZE_H) */