[Issue 11325] swap accepts aggregates with non-mutable fields
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Oct 22 09:48:05 PDT 2013
http://d.puremagic.com/issues/show_bug.cgi?id=11325
Andrej Mitrovic <andrej.mitrovich at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |andrej.mitrovich at gmail.com
--- Comment #1 from Andrej Mitrovic <andrej.mitrovich at gmail.com> 2013-10-22 09:48:03 PDT ---
In git-head I can't reproduce your test-case:
-----
import std.algorithm;
void main()
{
struct S
{
const int i;
}
S s1 = S(0);
S s2 = S(1);
swap(s1, s2); // Error: cannot modify struct lhs S with immutable members
}
-----
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list