Workaround for Issue 6906
Rene Zwanenburg
renezwanenburg at gmail.com
Thu Mar 22 13:12:10 PDT 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.
More information about the Digitalmars-d
mailing list