[Issue 19669] There is no way for code to detect whether -dip1000 is enabled or not

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Feb 11 19:20:37 UTC 2019


https://issues.dlang.org/show_bug.cgi?id=19669

Seb <greeenify at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |greeenify at gmail.com

--- Comment #1 from Seb <greeenify at gmail.com> ---
For reference and completeness, here's a better example of what you can do
already to detect dip1000:

```d
void main()
{
    enum isDIP1000 = __traits(compiles, () @safe {
         int x;
         int* p;
         p = &x;
    });
    pragma(msg, isDIP1000);
}
```

normal: https://run.dlang.io/is/RID7vh
-dip1000: https://run.dlang.io/is/1yJfVQ

--


More information about the Digitalmars-d-bugs mailing list