March 22, 2012 Workaround for Issue 6906 | ||||
|---|---|---|---|---|
| ||||
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 {
}
| ||||
March 22, 2012 Re: Workaround for Issue 6906 | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Rene Zwanenburg | 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.
| |||
Copyright © 1999-2021 by the D Language Foundation
Permalink
Reply