Solution to "statement is not reachable" depending on template variables?
tsbockman via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Thu Mar 17 15:48:10 PDT 2016
On Thursday, 17 March 2016 at 17:12:07 UTC, Steven Schveighoffer
wrote:
> Yes. I agree. The way I look at it is that the code *is*
> reached in some cases, so it should compile (and just remove
> that section in that instance).
>
> IMO any time a template value is used for branching, it should
> turn that warning off.
>
> -Steve
That's what I think it should do, also. However, when we
discussed it before, Daniel Murphy pretty much told me there is
no practical way to actually implement that behavior in the
compiler.
So, the next best thing is to just remove the warning entirely.
More information about the Digitalmars-d-learn
mailing list