https://issues.dlang.org/show_bug.cgi?id=18415
Issue ID: 18415
Summary: Typedef ignores @disabled default constructor
Product: D
Version: D2
Hardware: x86
OS: Windows
Status: NEW
Severity: enhancement
Priority: P1
Component: phobos
Assignee: [email protected]
Reporter: [email protected]
When a type that has a disabled default constructor is used in
std.typecons.Typedef, it's possible to create an uninitialized instance of the
type, since Typedef doesn't disable its constructor:
unittest {
import std.typecons : Typedef;
struct S {
@disable this();
}
//S s1; // Fails horribly.
Typedef!S s1; // Compiles without issue.
}
--