Bug 22058 – [Reg 2.074] std.traits.isNumeric & isSigned should not be true for complex or imaginary types

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2021-06-21T07:38:36Z
Last change time
2021-06-25T06:17:09Z
Keywords
pull
Assigned to
No Owner
Creator
Nathan S.

Comments

Comment #0 by n8sh.secondary — 2021-06-21T07:38:36Z
Below code fails from 2.074 onward: --- import std.traits; static assert(!isNumeric!ifloat); static assert(!isNumeric!cfloat); static assert(!isSigned!ifloat); static assert(!isSigned!cfloat); --- Note that in 2.074 isFloatingPoint remained false for ifloat and cfloat, creating an inconsistency.
Comment #1 by dlang-bot — 2021-06-21T07:51:43Z
@n8sh created dlang/phobos pull request #8147 "[Reg 2.074] std.traits.isFloatingPoint, isNumeric, isUnsigned, and isSigned should never be true for SIMD vectors, imaginary/complex numbers, or enums with character base types" fixing this issue: - Fix 22056, 22057, 22058 - [Reg 2.074] std.traits.isFloatingPoint, isNumeric, isUnsigned, and isSigned should never be true for SIMD vectors, imaginary/complex numbers, or enums with character base types https://github.com/dlang/phobos/pull/8147
Comment #2 by dlang-bot — 2021-06-25T06:17:09Z
dlang/phobos pull request #8147 "[Reg 2.074] std.traits.isFloatingPoint, isNumeric, isUnsigned, and isSigned should never be true for SIMD vectors, imaginary/complex numbers, or enums with character base types" was merged into stable: - 6c329ba358ebe491eba9b9bb390c006d8fd77027 by Nathan Sashihara: Fix 22056, 22057, 22058 - [Reg 2.074] std.traits.isFloatingPoint, isNumeric, isUnsigned, and isSigned should never be true for SIMD vectors, imaginary/complex numbers, or enums with character base types https://github.com/dlang/phobos/pull/8147