November 01, 2023 [Issue 24215] New: std.traits.isBasicType!Enum returns true | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=24215 Issue ID: 24215 Summary: std.traits.isBasicType!Enum returns true Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: normal Priority: P1 Component: phobos Assignee: nobody@puremagic.com Reporter: snarwin+bugzilla@gmail.com As of DMD+Phobos 2.105.2, the following program fails to compile: --- import std.traits; enum E { a } static assert(!isBasicType!E); --- According to the language spec [1], the basic types consist of `void`, `bool`, the built-in integer types, the built-in floating-point types, and the built-in character types. Enum types are not included. std.traits.isBasicType should follow with the language spec, and return `false` for enum types. [1] https://dlang.org/spec/type.html#basic-data-types -- |
Copyright © 1999-2021 by the D Language Foundation