std.traits.isBoolean

Nathan S. no.public.email at example.com
Mon Feb 19 17:22:04 UTC 2018


On Monday, 19 February 2018 at 15:12:15 UTC, Tony wrote:
> But, assuming there is a use case for it, what if you want to 
> restrict to a type that is either boolean, or a struct/class 
> that can substitute for boolean - how do you do that without 
> using the "private" TypeOfBoolean thing?


In that case you can just write `is(T : bool)`.


More information about the Digitalmars-d-learn mailing list