lazy evaluation of logical operators in enum definition

Atila Neves atila.neves at gmail.com
Wed Apr 18 10:19:20 UTC 2018


On Wednesday, 18 April 2018 at 04:44:23 UTC, Shachar Shemesh 
wrote:
> On 17/04/18 13:59, Simen Kjærås wrote:
>> [...]
>
> Also, extremely dangerous.
>
> Seriously, guys and gals. __traits(compiles) (and its uglier 
> sibling, is(typeof())) should be used *extremely* sparingly.
>
> [...]

A very good rule of thumb. I've lost of how many times I've had a 
bug because of __traits(compiles) being false, but not in the way 
I expected it to be!


More information about the Digitalmars-d mailing list