[v3 PATCH] Implement N4387 and LWG 2367

Ville Voutilainen ville.voutilainen@gmail.com
Sun Jun 7 08:49:00 GMT 2015


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



More information about the Libstdc++ mailing list