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

rikki cattermole rikki at cattermole.co.nz
Fri Sep 6 12:17:11 UTC 2019

The D code blocks should have the language set to D (```d ... ```) for 
easier reading.

Your examples in abstract didn't look right.
I ran the second to confirm my suspicion:

onlineapp.d(9): Error: undefined identifier T

Here is the test case in your implementation linked that made me 
understand your intention for the DIP:

void main() {
     TestAlias!(int, float) testObj;

struct TestType(T, Q) { }
alias TestAlias(T, Q) = TestType!(T, Q);
static void testFunction(T, Q)(TestAlias!(T, Q) arg) { }

Current error:

onlineapp.d(5): Error: template onlineapp.testFunction cannot deduce 
function from argument types !()(TestType!(int, float)), candidates are:
onlineapp.d(10):        onlineapp.testFunction(T, Q)(TestAlias!(T, Q) arg)

More information about the Digitalmars-d mailing list