SFINAE
Andrei Alexandrescu
SeeWebsiteForEmail at erdani.org
Sun Oct 5 17:32:05 PDT 2008
Jarrett Billingsley wrote:
> On Sun, Oct 5, 2008 at 8:21 PM, bearophile <bearophileHUGS at lycos.com> wrote:
>> Andrei Alexandrescu:
>>> void fun(int a, char[] b);
>>> should be treated as if it were declared:
>>> void fun(T, U)(T a, U b) if (is(T == int) && is(U == char[]));
>>>
>>> In other words: a regular function is nothing but an "infinitely
>>> specialized" template function.
>> So you can also take a delegate/function pointer of that fun() template.
>
> There's nothing stopping you from taking the address of templated
> functions now, as long as they're fully specified. Unless you're only
> talking about the syntactic benefits of being able to write &fun
> instead of &fun!(int, char[]).
Yah, that's part of "But there are some more things to change". Ahem.
Andrei
More information about the Digitalmars-d
mailing list