Stroustrup's slides about c++11 and c++14

Daniel Murphy via Digitalmars-d digitalmars-d at puremagic.com
Sun Sep 14 00:35:35 PDT 2014


"Timon Gehr"  wrote in message news:lv2mgv$qcq$1 at digitalmars.com...

> However, as Peter points out, static if as implemented in DMD currently 
> has some serious issues:
>
> static if(!is(typeof(x))) enum y=2;
> static if(!is(typeof(y))) enum x=1;
>
> This code is ambiguous: It could define either x or y.

I do acknowledge this is a problem, but I am yet to run into it in actual D 
code.  Most of my static ifs are either inside templates, inside functions, 
or are being used to bypass version's limitations. 



More information about the Digitalmars-d mailing list