Can I use boost::bind or the boost lambda library to create a functor that ignores its arguments and always returns a constant?
e.g. a functor with equivalent behaviour to:
int returnThree( SomeType arg ) { return 3; }
From Barry's comment on sehe's answer:
#include "boost/lambda/lambda.hpp"
...
auto returnThree = boost::lambda::constant(3);