Unreachable warning is annoying

Timon Gehr timon.gehr at gmx.ch
Tue Mar 13 19:21:47 UTC 2018


On 13.03.2018 18:43, H. S. Teoh wrote:
> On Tue, Mar 13, 2018 at 01:32:55PM -0400, Steven Schveighoffer via Digitalmars-d wrote:
> [...]
>> An unrolled foreach on a tuple has a notion that the flow control
>> jumps out of the loop, and it's OK to skip further loops (even though
>> they are technically unrolled).
> [...]
> 
> This is not true.  Foreach on a tuple does *not* skip expanding all
> iterations of the loop regardless of any `break`s or `continue`s. It's
> the codegen that eliminates the resulting dead code.  See:
> 
> 	https://wiki.dlang.org/User:Quickfur/Compile-time_vs._compile-time#Case_Study:_foreach_over_a_type_list
> 
> 
> T
> 

I think that's what he was saying. :)


More information about the Digitalmars-d mailing list