Skip to content
Snippets Groups Projects
Commit 3b7d3cb1 authored by Nat Goodspeed's avatar Nat Goodspeed
Browse files

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.
parent 210c95b2
No related branches found
No related tags found
No related merge requests found
...@@ -46,6 +46,7 @@ typedef U32 uint32_t; ...@@ -46,6 +46,7 @@ typedef U32 uint32_t;
#include "boost/range.hpp" #include "boost/range.hpp"
#include "boost/foreach.hpp" #include "boost/foreach.hpp"
#include "boost/function.hpp" #include "boost/function.hpp"
#include "boost/bind.hpp"
#include "boost/phoenix/bind/bind_function.hpp" #include "boost/phoenix/bind/bind_function.hpp"
#include "boost/phoenix/core/argument.hpp" #include "boost/phoenix/core/argument.hpp"
using namespace boost::phoenix; using namespace boost::phoenix;
...@@ -1659,7 +1660,7 @@ namespace tut ...@@ -1659,7 +1660,7 @@ namespace tut
// takes a callable. To this callable it passes the // takes a callable. To this callable it passes the
// std::ostream with which it's writing the // std::ostream with which it's writing the
// NamedTempFile. // NamedTempFile.
bind(writeLLSDArray, placeholders::arg1, cdata)); boost::bind(writeLLSDArray, _1, cdata));
python("read C++ notation", python("read C++ notation",
placeholders::arg1 << placeholders::arg1 <<
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment