Suppose I have a function which takes some form of predicate:
void Foo( boost::function<bool(int,int,int)> predicate );
If I want to call it with a predicate that always returns true, I can define a helper function:
bool AlwaysTrue( int, int, int ) { return true; }
...
Foo( boost::bind( AlwaysTrue ) );
But is there anyway to call this function (possibly using boost::lambda) without having to define a separate function?
[Edit: forgot to say: I CAN'T use C++0x]