[Issue 8955] Can't have qualified field with not-qualified constructor/postblit
https://issues.dlang.org/show_bug.cgi?id=8955 Jack Stouffer changed: What|Removed |Added See Also||https://issues.dlang.org/sh ||ow_bug.cgi?id=17658 --
[Issue 8955] Can't have qualified field with not-qualified constructor/postblit
https://issues.dlang.org/show_bug.cgi?id=8955 Vladimir Panteleev changed: What|Removed |Added Status|NEW |RESOLVED See Also||https://issues.dlang.org/sh ||ow_bug.cgi?id=14838 Resolution|--- |WORKSFORME --- Comment #4 from Vladimir Panteleev --- (In reply to Jack Stouffer from comment #3) > Raising this to major because not being able to define a shared postblit > kills shared completely for user defined types. Denis' original example works since 2.068.0 (https://github.com/dlang/dmd/pull/4845), so I think it would be better to open a new bug for that. --
[Issue 8955] Can't have qualified field with not-qualified constructor/postblit
https://issues.dlang.org/show_bug.cgi?id=8955 Seb changed: What|Removed |Added CC||greensunn...@gmail.com --
[Issue 8955] Can't have qualified field with not-qualified constructor/postblit
https://issues.dlang.org/show_bug.cgi?id=8955 Jack Stouffer changed: What|Removed |Added CC||j...@jackstouffer.com Severity|normal |major --- Comment #3 from Jack Stouffer --- Raising this to major because not being able to define a shared postblit kills shared completely for user defined types. --
[Issue 8955] Can't have qualified field with not-qualified constructor/postblit
http://d.puremagic.com/issues/show_bug.cgi?id=8955 jens.k.muel...@gmx.de changed: What|Removed |Added CC||jens.k.muel...@gmx.de --- Comment #2 from jens.k.muel...@gmx.de 2013-01-09 06:58:53 PST --- I stumbled over this today. What I don't understand is why/how postblit can be const? I mean if the object is const then I shouldn't be allowed to change it. Because you are copying to something that is const. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 8955] Can't have qualified field with not-qualified constructor/postblit
http://d.puremagic.com/issues/show_bug.cgi?id=8955 --- Comment #1 from Denis Shelomovskij 2012-11-03 17:25:18 MSK --- Partial workaround: For const/immutable postblit/dtor: --- struct S { private void myPostblit() { } this(this) inout { (cast(S*) &this).myPostblit(); } private void myDtor() { } ~this() inout // Plese `inout` before `~this()` if Issue 8953 unfixed { (cast(S*) &this).myDtor(); } } struct S_ { const S sc; immutable S si; } --- Note: at least `this(this) inout { }` or `opAssign` is required for dtor For shared dtor: --- struct S { void opAssign(shared S s) shared { this = s; } // required for dtor private void myDtor() { } shared~this() // Plese `inout` before `~this()` if Issue 8953 unfixed { (cast(S*) &this).myDtor(); } } struct S_ { shared S sc; } --- Same for constructor except it doesn't require somebody like dtor. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---