[Issue 11934] Allow `ref` in `foreach` over range iff `front` returns by `ref`

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Aug 19 15:56:15 UTC 2024


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

--- Comment #6 from Nick Treleaven <nick at geany.org> ---
(In reply to Denis Shelomovskii from comment #0)
>     static assert(!__traits(compiles, { foreach(ref n; S1()) { } })); // fails

This line still fails, so reopening. This could be fixed in the next edition.

--


More information about the Digitalmars-d-bugs mailing list