Getting the error from __traits(compiles, ...)

Walter Bright newshound1 at digitalmars.com
Thu Nov 12 13:50:17 PST 2009


Denis Koroskin wrote:
> He was asking for a string so that it would be possible to parse and/or 
> output. More like:
> 
> enum s = __traits(compiles_or_msg, ...);
> static if (s.length == 0) {
>    // no error
> } else {
>    // do stuff with error message
> }

Makes sense.



More information about the Digitalmars-d mailing list