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: [v3 PATCH] Implement N4387 and LWG 2367


On 7 June 2015 at 11:33, Ville Voutilainen <ville.voutilainen@gmail.com> wrote:
>>> You use a lot: typename enable_if<X, bool>::type=true
>>> while the current code seems to favor: class=typename enable_if<X>::type.
>>> I don't really care which one is used, but it is easier to read when the
>>> style is consistent through the library.
>> It's not a style issue. That template parameter needs to be a non-type one,
>> otherwise the overloads are ambiguous.
> ...and I think it doesn't necessarily need to be non-type, I think it can be
> made to work with a type parameter that is enable_if<X, true_type>
> and enable_if<X, false_type> for the mutually-exclusive overloads.

Except that no, it can't. It really needs to be a non-type parameter. :P


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