https://issues.dlang.org/show_bug.cgi?id=4508

ag0ae...@gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ag0ae...@gmail.com

--- Comment #3 from ag0ae...@gmail.com ---
(In reply to Nick Treleaven from comment #2)
> `foreach (e; seq)` works at compile time for an AliasSeq, so I don't see why
> `foreach (i; low..high)` can't make `i` known at compile-time if the bounds
> are known.

Can `i` be made known at compile-time without unrolling the loop (in the
binary)? Surely we don't want to unroll every loop that can possibly be
unrolled. For example, it would be very surprising if the compiler unrolled a
loop like `foreach (i; 0 .. uint.max) writeln(i);`, generating gigabytes of
machine code.

--

Reply via email to