
2011/3/20 Steven Watanabe <watanabesj@gmail.com>
AMDG
On 03/20/2011 01:00 AM, Joachim Faulhaber wrote:
Also I don't understand, why inheritence form binary_function<T,U,R> is no longer declared, but instead of this, the redundant declaration of all associated types for every functor. Does this codereplication serve any purpose?
Yeah. The standard only guarantees the typedefs, not inheritance from std::binary_function. The implementation is free to use std::binary_function, however.
Aha, this makes sense. Still I am wondering why functors are restricted to only one template type parameter. Extending the functors to 2 or 3 type parameters template<class T, class U=T, class R=T> struct plus; would make them much more useful while old code based on only one parameter should not be broken. Thanks, Joachim -- Interval Container Library [Boost.Icl] http://www.joachim-faulhaber.de