$(D_KEYWORD from) converted to a boolean.
$(D_PSYMBOL ConvException) if from isn't convertible.
assert(!0.0.to!bool); assert(0.2.to!bool); assert(0.5.to!bool); assert(1.0.to!bool); assert(!0.to!bool); assert(1.to!bool);
assert("true".to!bool); assert(!"false".to!bool); assert(String("true").to!bool); assert(!String("false").to!bool);
Converts from to a boolean.
If From is a numeric type, then 1 becomes $(D_KEYWORD true), 0 $(D_KEYWORD false). Otherwise $(D_PSYMBOL ConvException) is thrown.
If To is a string (built-in string or $(D_PSYMBOL String)), then "true" or "false" are converted to the appropriate boolean value. Otherwise $(D_PSYMBOL ConvException) is thrown.