SFINAE

Jarrett Billingsley jarrett.billingsley at gmail.com
Sun Oct 5 16:30:29 PDT 2008


On Sun, Oct 5, 2008 at 7:15 PM, Jason House <jason.james.house at gmail.com> wrote:
> Andrei Alexandrescu wrote:
>
>> I think conditional templates obviate most, if not all, of the need for
>> sfinae. There need to be some more steps taken, most importantly
>> unification of regular functions with template functions.
>>
>> Andrei at home
>
> Can you expand on the "unification of regular functions with template
> functions"?
>

So you can do i.e.

void foo(int x) {}
void foo(T)(T t) {}

foo(5) calls the int overload and foo(3.4) calls foo!(typeof(3.4))(3.4).



More information about the Digitalmars-d mailing list