http://d.puremagic.com/issues/show_bug.cgi?id=9665
rswhi...@googlemail.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |rswhi...@googlemail.com --- Comment #5 from rswhi...@googlemail.com 2013-03-09 09:32:56 PST --- (In reply to comment #3) > (In reply to comment #2) > > (In reply to comment #1) > > > This is unfixable problem, if I'm not mistaken. > > > > What if opAssign is const/inout? > > It would be invoked, but you cannot do any meaningful operation in it. You can: import std.stdio; import std.c.string : memcpy; struct Foo1 // opAssign is a function { int value; void opAssign(int src) const { int* ptr = cast(int*) &this.value; *ptr = src; } } struct Boo { const Foo1 f1; this(int src) { f1 = src; // Error! } } void main() { Boo b = Boo(42); writeln(b.f1.value); // prints 42 } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------