For one use case, boost::bind() better than boost::phoenix::bind().

We use boost::phoenix::placeholders::arg1 to imply a whole lambda expression,
replacing boost::lambda. But to bind a plain function in a more
straightforward way, seems classic boost::bind() works while
boost::phoenix::bind() does not.
master
Nat Goodspeed 2014-12-16 15:17:24 -05:00
parent 210c95b283
commit 3b7d3cb1ea
1 changed files with 2 additions and 1 deletions

View File

@ -46,6 +46,7 @@ typedef U32 uint32_t;
#include "boost/range.hpp"
#include "boost/foreach.hpp"
#include "boost/function.hpp"
#include "boost/bind.hpp"
#include "boost/phoenix/bind/bind_function.hpp"
#include "boost/phoenix/core/argument.hpp"
using namespace boost::phoenix;
@ -1659,7 +1660,7 @@ namespace tut
// takes a callable. To this callable it passes the
// std::ostream with which it's writing the
// NamedTempFile.
bind(writeLLSDArray, placeholders::arg1, cdata));
boost::bind(writeLLSDArray, _1, cdata));
python("read C++ notation",
placeholders::arg1 <<