This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: std::max: if versus ?:
On Sun, Sep 23, 2012 at 10:09 AM, Marc Glisse <marc.glisse@inria.fr> wrote:
> I guess you wouldn't be happy with an
> enable_if<!__is_vector<_Tp>::value>::type
> either (plus overloads of max for vectors)?
that would be my position.
> Then that may mean no std::max for vectors, at least until someone makes the
> inner type and size of vectors deducible (that would make the vector version
> of max more specialized than the generic one and allow overloads without
> touching the generic function). Which isn't that bad, people are big enough
> to write (x<y)?y:x themselves...
I do not understand why you can't have a syntax such as __vector<T,N>
those extensions. If that syntax isn't there, you should consider adding
it. It is a natural thing to have.
-- Gaby