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: nob...@puremagic.com
          Reporter: simen.kja...@gmail.com

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.
}

--

Reply via email to