is there any reason UFCS can't be used with 'new'?
Ali Çehreli via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Tue Sep 30 11:11:01 PDT 2014
On 09/30/2014 11:07 AM, Ali Çehreli wrote:
> To make a nested class unnested, declare it as static, which seems to
> work in your case as well:
>
> class C { int x, y; }
> auto x = New!C();
Copy+paste cannot read my mind. :( Of course there should be 'static'
keyword there. :p
static class C { int x, y; }
Ali
P.S. Shame! There is no mention of nested classes in my book. I put it
in my short to-do list.
More information about the Digitalmars-d-learn
mailing list