Skip to content

Commit ab73ac7

Browse files
committed
Add notes in the spec that complex and imaginary types are deprecated
1 parent 8cd1bd8 commit ab73ac7

File tree

5 files changed

+7
-11
lines changed

5 files changed

+7
-11
lines changed

deprecate.dd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ $(SPEC_S Deprecated Features,
1818
$(TROW $(DEPLINK Using the result of a comma expression), 2.072, 2.072, 2.079,  )
1919
$(TROW $(DEPLINK delete),  , 2.079,  ,  )
2020
$(TROW $(DEPLINK scope as a type constraint),  , 2.087,  ,  )
21-
$(TROW $(DEPLINK Imaginary and complex types), future,  ,  ,  )
21+
$(TROW $(DEPLINK Imaginary and complex types), future, 2.097,  ,  )
2222
$(TROW $(DEPLINK Implicit catch statement), 2.072, 2.072, 2.081,   )
2323
$(TROW $(DEPLINK .sort and .reverse properties for arrays), ?, 2.072,  , 2.075)
2424
$(TROW $(DEPLINK C-style array pointers), ?, 2.072, 2.082,  )

spec/expression.dd

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1857,7 +1857,6 @@ $(H3 $(LNAME2 uniform_construction_syntax, Uniform construction syntax for built
18571857
---
18581858
auto a = ushort(); // same as: ushort.init
18591859
auto b = wchar(); // same as: wchar.init
1860-
auto c = creal(); // same as: creal.init
18611860
---
18621861

18631862

spec/lex.dd

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -877,19 +877,12 @@ $(GNAME LeadingDecimal):
877877
and those followed by $(B L) are of type `real`.
878878
)
879879

880-
$(P If a floating literal is followed by $(B i), then it is an
881-
$(I ireal) (imaginary) type.
882-
)
883-
884880
$(P Examples:)
885881

886882
---------
887883
0x1.FFFFFFFFFFFFFp1023 // double.max
888884
0x1p-52 // double.epsilon
889885
1.175494351e-38F // float.min
890-
6.3i // idouble 6.3
891-
6.3fi // ifloat 6.3
892-
6.3Li // ireal 6.3
893886
---------
894887

895888
$(P The literal may not exceed the range of the type.
@@ -905,6 +898,9 @@ $(GNAME LeadingDecimal):
905898
1.; // OK, double
906899
---
907900

901+
$(P NOTE: Floating literals followed by $(B i) to denote imaginary
902+
floating point values have been deprecated.)
903+
908904

909905
$(H2 $(LNAME2 keywords, Keywords))
910906

spec/traits.dd

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,6 @@ import core.simd : float4;
130130
enum E : float { a, b }
131131

132132
static assert(__traits(isFloating, float));
133-
static assert(__traits(isFloating, idouble));
134-
static assert(__traits(isFloating, creal));
135133
static assert(__traits(isFloating, E));
136134
static assert(__traits(isFloating, float4));
137135

spec/type.dd

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,9 @@ $(H2 $(LEGACY_LNAME2 Basic Data Types, basic-data-types, Basic Data Types))
128128
type supported by the x86 FPU.
129129
)
130130

131+
$(P NOTE: Complex and imaginary types `ifloat`, `idouble`, `ireal`, `cfloat`, `cdouble`,
132+
and `creal` have been deprecated in favor of `std.complex.Complex`.)
133+
131134
$(H2 $(LEGACY_LNAME2 Derived Data Types, derived-data-types, Derived Data Types))
132135

133136
$(UL

0 commit comments

Comments
 (0)