Bug 17706 – std.math.isFinite does not compile for cdouble: "No traits support for cdouble"

Status
RESOLVED
Resolution
WONTFIX
Severity
normal
Priority
P1
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2017-07-31T05:45:25Z
Last change time
2020-03-21T03:56:38Z
Assigned to
No Owner
Creator
Infiltrator

Comments

Comment #0 by lt.infiltrator — 2017-07-31T05:45:25Z
---- import std.math : isFinite; void main() { cdouble foo = 3 + 3i; assert(foo.isFinite); } ---- /opt/compilers/dmd2/include/std/math.d(330): Error: static assert "No traits support for cdouble" /opt/compilers/dmd2/include/std/math.d(5384): instantiated from here: floatTraits!cdouble /d598/f163.d(5): instantiated from here: isFinite!cdouble ---- This works fine for both cfloat and creal.
Comment #1 by dlang-bugzilla — 2017-08-12T18:58:08Z
Complex types are on the path to deprecation: https://dlang.org/deprecate.html#Imaginary%20and%20complex%20types