
I guess we have to wait for decltype to be able to use lambda expressions as predicates here?
Why? There are already examples with lambda predicates in the docs.
Yes, constrained_value does support lambdas at runtime using runtime
boost::function.
I was hoping that we will also be possible to specify lambdas at
compile time, which is more efficient because boost::function incurs
cost equivalent to a virtual method call (it prohibits inlining and
dereferences a pointer). And there is the cost of storing the
function pointer too...
I am imagining things like constrained_value