digitalmars.D - Workaround for Issue 6906
- Rene Zwanenburg (5/5) Mar 22 2012 It appears I'm running into issue 6906, meaning it's impossible
- Rene Zwanenburg (13/18) Mar 22 2012 Apologies, sent before I finished. Tab + enter in the web
It appears I'm running into issue 6906, meaning it's impossible to store structs in an AA if they have opAssign defined. For example: struct S { }
Mar 22 2012
On Thursday, 22 March 2012 at 20:08:02 UTC, Rene Zwanenburg wrote:It appears I'm running into issue 6906, meaning it's impossible to store structs in an AA if they have opAssign defined. For example: struct S { }Apologies, sent before I finished. Tab + enter in the web interface. struct S { void opAssign(S s) { // for the AA assign, 'this' is invalid here } } S[int] sAA; sAA[1] = S(); Is there a workaround? I'm storing smart pointers in an AA, the combination incorrect this + reference counting destructor is fatal.
Mar 22 2012