I'm trying to use boost::bind and boost::function with std::logical_not
and I've run into some strange template magic that I don't understand.
In the example below, I use boost::function to help compose several
boost::bind calls so that I don't have to do it all on one line (I find
that this improves readability). The problem is that when I do this,
the functions that are bound with boost::bind never get called. They
will get called only if I construct everything on one line. (???)
Is this expected behavior? If so, why does it work like this?
Thanks,
aaron
#include <algorithm>
#include <functional>
#include "boost/bind.hpp"
#include "boost/function.hpp"
using namespace std;
using namespace boost;
class test {
public:
void bindtest() {
// test1: composed gradually for clarity
//
function