[Issue 19341] const is ignored in iteration over a tuple
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Nov 1 12:01:28 UTC 2018
https://issues.dlang.org/show_bug.cgi?id=19341
anonymous4 <dfj1esp02 at sneakemail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|Strange foreach, tupleof, |const is ignored in
|const ref interaction |iteration over a tuple
--- Comment #1 from anonymous4 <dfj1esp02 at sneakemail.com> ---
Reduced:
---
import std.typecons;
void f()
{
auto t=tuple(1,2);
foreach (const int v; t)
{
v = 0;
}
}
---
--
More information about the Digitalmars-d-bugs
mailing list