"Timon Gehr" wrote in message news:[email protected]...
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.
