When is __traits(compiles, { ... } )
preferred over is(typeof( { ... } )) and vice versa when writing stuff likeenum isCopyable(S) = is(typeof( { S foo = S.init; S copy = foo; } ));
? Further, are there cases where the two idioms aren't exchangable?
Nordlöw via Digitalmars-d-learn Wed, 20 Sep 2017 05:07:19 -0700
When is __traits(compiles, { ... } )
preferred over is(typeof( { ... } )) and vice versa when writing stuff likeenum isCopyable(S) = is(typeof( { S foo = S.init; S copy = foo; } ));
? Further, are there cases where the two idioms aren't exchangable?