Fixing spurious "statement is not reachable" in template code
Timon Gehr via Digitalmars-d
digitalmars-d at puremagic.com
Tue Oct 27 12:30:08 PDT 2015
On 10/27/2015 06:35 PM, Steven Schveighoffer wrote:
> I understand how the compiler treats it. In some cases, the statement
> is reachable, the compiler is unhelpfully pointing out cases where it
> was unreachable.
The reachable statement is not the same as the statement that is flagged
unreachable. This is not an implementation detail and it is not
'incorrect'. It might be changed if the consensus is that it is
unhelpful. Personally, I usually avoid generating dead code.
More information about the Digitalmars-d
mailing list