Re: Query for -dip1000

2019-02-11 Thread Meta via Digitalmars-d-learn
On Sunday, 10 February 2019 at 20:04:29 UTC, Per Nordlöw wrote: 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, {

Re: Query for -dip1000

2019-02-11 Thread Jonathan M Davis via Digitalmars-d-learn
On Monday, February 11, 2019 3:23:25 AM MST Seb via Digitalmars-d-learn wrote: > On Monday, 11 February 2019 at 09:29:13 UTC, Jonathan M Davis > > wrote: > > On Sunday, February 10, 2019 1:04:29 PM MST Per Nordlöw via > > > > Digitalmars-d- learn wrote: > >> [...] > > > > A quick grep of Phobos sh

Re: Query for -dip1000

2019-02-11 Thread Seb via Digitalmars-d-learn
On Monday, 11 February 2019 at 09:29:13 UTC, Jonathan M Davis wrote: On Sunday, February 10, 2019 1:04:29 PM MST Per Nordlöw via Digitalmars-d- learn wrote: [...] A quick grep of Phobos shows a version(DIP1000) block in std/typecons.d, which appears to be used to make it so that a particular

Re: Query for -dip1000

2019-02-11 Thread Jonathan M Davis via Digitalmars-d-learn
On Sunday, February 10, 2019 1:04:29 PM MST Per Nordlöw via Digitalmars-d- learn wrote: > 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 > > sta

Re: Query for -dip1000

2019-02-10 Thread Per Nordlöw via Digitalmars-d-learn
On Sunday, 10 February 2019 at 20:04:29 UTC, Per Nordlöw wrote: Or do I have to write a trait myself? Oops, I had already posted that and got an answer at https://forum.dlang.org/post/qglynupcootocnnnp...@forum.dlang.org

Query for -dip1000

2019-02-10 Thread Per Nordlöw via Digitalmars-d-learn
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() {