Query for -dip1000
Per Nordlöw
per.nordlow at gmail.com
Sun Feb 10 20:04:29 UTC 2019
Is there a way to query if the -dip1000 flag has been passed to
the compiler? I need it for enabling certain DIP-1000 escape
analysis tests only when -dip1000 has been passed.
For instance
static assert(!__traits(compiles, {
char[] f()
{
char[2] x;
return x[].splitterASCII!(_ => _ == '
').front;
}
}));
at
https://github.com/nordlow/phobos-next/blob/bd2fe42978aab2313977042c858d77c5766538e8/src/splitter_ex.d#L110
Or do I have to write a trait myself?
More information about the Digitalmars-d-learn
mailing list