Bug 22056 – [Reg 2.074] std.traits.isFloatingPoint, isNumeric, isUnsigned, & isSigned should never be true for SIMD vectors
Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2021-06-21T07:38:22Z
Last change time
2021-06-25T06:17:07Z
Keywords
pull
Assigned to
No Owner
Creator
Nathan S.
Comments
Comment #0 by n8sh.secondary — 2021-06-21T07:38:22Z
Below code fails from 2.074 onward:
---
import core.simd : int4, uint4, float4;
import std.traits;
static assert(!isFloatingPoint!float4);
static assert(!isNumeric!float4);
static assert(!isSigned!float4);
static assert(!isNumeric!int4);
static assert(!isSigned!int4);
static assert(!isNumeric!uint4);
static assert(!isUnsigned!uint4);
---
Note that in 2.074 isIntegral remained false for uint4 and int4, creating an inconsistency.
Comment #1 by dlang-bot — 2021-06-21T07:51:40Z
@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:07Z
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