Hi,
I'm trying out boost:phoenix. Until now I used boost::lambda. I have code
written using boost::lambda that returns a boost::function. E.g.
boost::function flog() {
using namespace boost::lambda;
return bind(static_cast(std::log), _1);
}
And with boost::lambda I can reuse the boost::function like this
boost::function func = -bind(flog(), _1);
to build bigger blocks.
But I cannot make it work with boost::phoenix.
boost::function func = -bind(flog(), arg1);
does not compile.
How do I use a boost::function within phoenix? Or what do I need to return
instead of a boost::function to reuse it in phoenix? Basically I want to
build more complex functions out of simple ones which are returned by some
function to hide the internals of the function.
I'm using Boost version 1.41.0 and g++ (Debian 4.3.2-1.1) 4.3.2.
Jens