[Issue 15329] New: __traits(isPOD, S) incorrectly returns true for structs with disabled S.init

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Fri Nov 13 10:14:48 PST 2015


https://issues.dlang.org/show_bug.cgi?id=15329

          Issue ID: 15329
           Summary: __traits(isPOD, S) incorrectly returns true for
                    structs with disabled S.init
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: petar.p.kirov at gmail.com

struct S
{   
   @disable
   enum init = 0;
}

static assert (!__traits(compiles, { S7 s = S7.init; }));
static assert (!is(typeof(S.init)));

static assert (__traits(isPOD, S7)); // Compiles - this is wrong

--


More information about the Digitalmars-d-bugs mailing list