@@ -103,6 +103,8 @@ $(H3 $(GNAME isArithmetic))
103
103
Otherwise, $(D false) is returned.
104
104
If there are no arguments, $(D false) is returned.)
105
105
106
+ $(P Arithmetic types are integral types and floating point types.)
107
+
106
108
$(SPEC_RUNNABLE_EXAMPLE_COMPILE
107
109
---
108
110
import std.stdio;
@@ -129,8 +131,17 @@ false
129
131
130
132
$(H3 $(GNAME isFloating))
131
133
132
- $(P Works like $(D isArithmetic), except it's for floating
133
- point types (including imaginary and complex types).)
134
+ $(P If the arguments are all either types that are floating point types,
135
+ or expressions that are typed as floating point types, then $(D true)
136
+ is returned.
137
+ Otherwise, $(D false) is returned.
138
+ If there are no arguments, $(D false) is returned.)
139
+
140
+ $(P The floating point types are:
141
+ `float`, `double`, `real`,
142
+ `ifloat`, `idouble`, `ireal`,
143
+ `cfloat`, `cdouble`, `creal`,
144
+ vectors of floating point types, and enums with a floating point base type.)
134
145
135
146
$(SPEC_RUNNABLE_EXAMPLE_COMPILE
136
147
---
@@ -148,8 +159,16 @@ static assert(!__traits(isFloating, float[4]));
148
159
149
160
$(H3 $(GNAME isIntegral))
150
161
151
- $(P Works like $(D isArithmetic), except it's for integral
152
- types (including character types).)
162
+ $(P If the arguments are all either types that are integral types,
163
+ or expressions that are typed as integral types, then $(D true)
164
+ is returned.
165
+ Otherwise, $(D false) is returned.
166
+ If there are no arguments, $(D false) is returned.)
167
+
168
+ $(P The integral types are:
169
+ `byte`, `ubyte`, `short`, `ushort`, `int`, `uint`, `long`, `ulong`, `cent`, `ucent`,
170
+ `bool`, `char`, `wchar`, `dchar`,
171
+ vectors of integral types, and enums with an integral base type.)
153
172
154
173
$(SPEC_RUNNABLE_EXAMPLE_COMPILE
155
174
---
@@ -171,8 +190,17 @@ static assert(!__traits(isIntegral, void*));
171
190
172
191
$(H3 $(GNAME isScalar))
173
192
174
- $(P Works like $(D isArithmetic), except it's for scalar
175
- types.)
193
+ $(P If the arguments are all either types that are scalar types,
194
+ or expressions that are typed as scalar types, then $(D true)
195
+ is returned.
196
+ Otherwise, $(D false) is returned.
197
+ If there are no arguments, $(D false) is returned.)
198
+
199
+ $(P Scalar types are integral types,
200
+ floating point types,
201
+ pointer types,
202
+ vectors of scalar types,
203
+ and enums with a scalar base type.)
176
204
177
205
$(SPEC_RUNNABLE_EXAMPLE_COMPILE
178
206
---
@@ -198,8 +226,16 @@ static assert(!__traits(isScalar, Object));
198
226
199
227
$(H3 $(GNAME isUnsigned))
200
228
201
- $(P Works like $(D isArithmetic), except it's for unsigned
202
- types.)
229
+ $(P If the arguments are all either types that are unsigned types,
230
+ or expressions that are typed as unsigned types, then $(D true)
231
+ is returned.
232
+ Otherwise, $(D false) is returned.
233
+ If there are no arguments, $(D false) is returned.)
234
+
235
+ $(P The unsigned types are:
236
+ `ubyte`, `ushort`, `uint`, `ulong`, `ucent`,
237
+ `bool`, `char`, `wchar`, `dchar`,
238
+ vectors of unsigned types, and enums with an unsigned base type.)
203
239
204
240
$(SPEC_RUNNABLE_EXAMPLE_COMPILE
205
241
---
0 commit comments