Not initialized out argument error
bearophile via Digitalmars-d
digitalmars-d at puremagic.com
Tue Jun 17 06:31:06 PDT 2014
Timon Gehr:
> struct S{ @disable this(); }
>
> void foo(out S s){} // ?
If you compile this code:
struct Foo {
@disable this();
}
void foo(out Foo x) {}
void main() {}
Gives a good error message (with a typo):
test.d(4): Error: cannot have out parameter of type Foo because
the default construction is disbaled
Bye,
bearophile
More information about the Digitalmars-d
mailing list