std.traits.isBoolean

Tony tonytdominguez at aol.com
Sun Feb 18 14:52:37 UTC 2018


At
https://dlang.org/library/std/traits/is_boolean.html

it has:


enum isBoolean(T) = is(BooleanTypeOf!T) && !isAggregateType!T;

per:
https://dlang.org/library/std/traits/is_aggregate_type.html

isAggregateType is true for [struct, union, class, interface].

So BooleanTypeOf!T is true for structs, unions, classes and 
interfaces? And if yes, why is that so?



More information about the Digitalmars-d-learn mailing list