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

Steven Schveighoffer <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
                 CC|                            |[email protected]
         Resolution|DUPLICATE                   |---

--- Comment #4 from Steven Schveighoffer <[email protected]> ---
This is not a duplicate of the general foreach problem. It's specific to
choice.

Other range-accepting functions work with const arrays just fine. This is a
problem with choice.

The fix is to remove the `auto ref` modifier on the range, which is
nonsensical, since it doesn't actually modify the range at all. It probably was
a premature optimization (verified it has been there from the start).

--

Reply via email to