DIP 1023--Resolution of Template Alias Formal Parameters in Template Functions--Community Review Round 1

jmh530 john.michael.hall at gmail.com
Wed Sep 11 00:35:26 UTC 2019


On Tuesday, 10 September 2019 at 21:48:33 UTC, Stefanos Baziotis 
wrote:
> [snip]

Here is a simpler example:

import std.traits : isNumeric;

template Foo(T)
     if (isNumeric!T)
{
     alias Foo = T;
}

void useFoo(T)(Foo!T x) {

}

void main() {
     int x;
     useFoo!int(x);
     useFoo(x); //error currently, will it compile with this DIP?
}




More information about the Digitalmars-d mailing list