You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$(P The following type instances are supported in a condition:)
267
+
268
+
$(UL
269
+
$(LI $(DDSUBLINK spec/type, FundamentalType, Fundamental types) are `true` when non-zero)
270
+
$(LI Pointers are `true` when non-null)
271
+
$(LI Reference types are `true` when non-null)
272
+
$(LI A user-defined type with a valid $(DDSUBLINK spec/operatoroverloading, cast, `opCast!bool()`) method will be called for the result. Otherwise, any
273
+
$(DDSUBLINK spec/struct, alias-this, `alias this`) member declaration
274
+
will be used if its target type itself matches one of these rules.)
275
+
$(LI An enum type is `true` if its base type matches one of these rules.)
276
+
)
277
+
$(P If none of these are valid, it is an error to use the value in a condition.)
278
+
279
+
$(NOTE A dynamic array can be used in a condition, which is `true` when non-null.
280
+
However, using this should be avoided as it can be bug-prone.
0 commit comments