[Issue 20211] should be set appropriate version for enabled DIPs (in command lines)
    d-bugmail at puremagic.com 
    d-bugmail at puremagic.com
       
    Mon Sep 16 10:09:39 UTC 2019
    
    
  
https://issues.dlang.org/show_bug.cgi?id=20211
--- Comment #2 from KnightMare <black80 at bk.ru> ---
(In reply to anonymous4 from comment #1)
>
> Try this:
> 
> template A() {
>   int[] f(scope int[] a) @safe { return a; }
> }
> static assert(!__traits(compiles,A!()));
thank you.
current workaround:
template isDip1000EnabledImpl() {
    private template A() { int[] f( scope int[] a) @safe { return a; } }
    public enum isDip1000EnabledImpl = !__traits( compiles, A!());
}
alias isDip1000Enabled = isDip1000EnabledImpl!();
--
    
    
More information about the Digitalmars-d-bugs
mailing list