__traits(compiles , mixin ... )
SrMordred
patric.dexheimer at gmail.com
Wed Oct 25 19:21:27 UTC 2017
On Wednesday, 25 October 2017 at 19:12:02 UTC, SrMordred wrote:
> Maybe i´m tired already, but whats wrong here:
>
> pragma(msg, __traits( compiles, mixin("int x") ) );
> //output: false
Or the original case I found:
struct T{}
pragma(msg, __traits( compiles, T() ) ); //true
pragma(msg, __traits( compiles, mixin("T()") ) ); //true
mixin( "T();" ); Error: `structliteral` has no effect in
expression `T()`
More information about the Digitalmars-d-learn
mailing list