digitalmars.D.bugs - [Issue 19236] New: Replace runtime `typeid(T).initializer().ptr is
- d-bugmail puremagic.com (19/19) Sep 09 2018 https://issues.dlang.org/show_bug.cgi?id=19236
https://issues.dlang.org/show_bug.cgi?id=19236 Issue ID: 19236 Summary: Replace runtime `typeid(T).initializer().ptr is null` checks with compile-time `__traits(isZeroInit, T)` Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: enhancement Priority: P1 Component: phobos Assignee: nobody puremagic.com Reporter: n8sh.secondary hotmail.com With the new `__traits(isZeroInit)` (https://github.com/dlang/dmd/pull/8583) we can check at compile-time if a type has a zero initializer. Aside from removing a branch and some dead code, removing a use of `TypeInfo` is a step towards -betterC compatibility. --
Sep 09 2018