From: Robert Kawulak (kawulak_at_[hidden])
Date: 2007-11-13 18:07:55


> From: Jeff Garland
> Ok, fair enough. I must have some misunderstanding of the
> implementation b/c
> I don't see how the function call can be optimized away by
> the compiler when
> the function pointer can be set at runtime.

That's simple - there are no function pointers in this case. ;-) The design is
flexible and allows for dynamically-changed constraints, but it also allows for
completely static constraints, the latter being the case here. A constraint is a
predicate - that's all. You can use boost::function to be able to dynamically
change the constraint, or you can use a predicate directly as the template's
parameter to make it statically associated with the type of used constrained
objects.

Best regards,
Robert