alias this and initialisation

Danni Coy danni.coy at gmail.com
Mon May 25 01:35:47 UTC 2020


can anybody tell me why

struct S
{
    int x;
    alias x this;
}

void test()
{
    S s;
    s = 8; // this works
    S s = 8 // but this does not?
}


More information about the Digitalmars-d-learn mailing list