D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 17706 - std.math.isFinite does not compile for cdouble: "No traits support for cdouble"
Summary: std.math.isFinite does not compile for cdouble: "No traits support for cdouble"
Status: RESOLVED WONTFIX
Alias: None
Product: D
Classification: Unclassified
Component: phobos (show other issues)
Version: D2
Hardware: All All
: P1 normal
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-07-31 05:45 UTC by Infiltrator
Modified: 2020-03-21 03:56 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Infiltrator 2017-07-31 05:45:25 UTC
----
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 Vladimir Panteleev 2017-08-12 18:58:08 UTC
Complex types are on the path to deprecation:

https://dlang.org/deprecate.html#Imaginary%20and%20complex%20types