This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: std::max: if versus ?:


On Sun, Sep 23, 2012 at 11:39 AM, Marc Glisse <marc.glisse@inria.fr> wrote:
> On Sun, 23 Sep 2012, Gabriel Dos Reis wrote:
>
>> I think I have a preference for reverting the patch.
>
>
> I don't mind, but could you explain what makes you prefer:
>       if (__a < __b)
>         return __b;
>       return __a;
> to:
>
>       return  __a < __b ? __b : __a;
> ?
>
> It would be useful to know, for next time. The only reason I can think of
> for reverting is that if I manage to implement ?: for vectors, it will give
> a hard error instead of a warning.

1. It has been "debugged" over several years.

2. the change does not appear to actually solve
    the problem we started with.

-- Gaby


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]