|
Boost : |
Subject: Re: [boost] [type_traits] Most Unifying Proposal for operator names Was: Review Typetraits Extension.
From: Joachim Faulhaber (afojgo_at_[hidden])
Date: 2011-03-20 18:52:51
2011/3/20 Steven Watanabe <watanabesj_at_[hidden]>
> 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
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk