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
I assume that instead of S7 you were referring to S. Why should it not compile? From the glossary [1] : "POD (Plain Old Data) Refers to a struct that contains no hidden members, does not have virtual functions, does not inherit, has no destructor, and can be initialized and copied via simple bit copies." If I'm not missing anything, S complies with all of the above. [1] https://dlang.org/glossary.html#pod
Closing as per previous comment.