On 10/27/2015 01:35 PM, Steven Schveighoffer wrote:
Easy to fix: void reachIf(bool x)() { static if(!x) return; else writeln("reached"); } The warning is correct, and incredibly annoying.Easy to fix, but the warning is incorrect, the statement is reachable if you use reachIf!true. A statement is not a compiled piece of code. -Steve
Versions of the same statement in different instantiations are independent. Templates are just a restricted form of hygienic macros.
