alias this constructor

Dave Jones dave at jones.com
Sun Mar 25 00:47:20 UTC 2018


struct Foo
{
     int x;
     alias x this;
}

Foo f = 12; // error

Foo foo;
f = 12;     // this is OK

any reason why the first cant be allowed?


More information about the Digitalmars-d mailing list