struct init property
Namespace
rswhite4 at googlemail.com
Thu Aug 23 17:00:22 PDT 2012
> I would expect you to be able to do
>
> test(NotNullable!Foo(new Foo));
>
> and with a helper function, you could have something like
>
> test(notNullable(new Foo));
>
> - Jonathan M Davis
But then you have an lvalue and cannot receive it as "ref
NotNullable!Foo". Your struct would be copied with the (default)
postblit ctor every time you send it to "test", or am I wrong?
More information about the Digitalmars-d-learn
mailing list