[Issue 12944] std.variant does not observe value semantics for large value types.

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Wed Jun 18 18:38:47 PDT 2014


https://issues.dlang.org/show_bug.cgi?id=12944

--- Comment #1 from Kapps <opantm2+dbugs at gmail.com> ---
Also worth noting that fixing this would require all peek and operations that
alter the value (i.e., opIndexAssign) to allocate if storing a reference to
another Variant.
https://github.com/D-Programming-Language/phobos/pull/2188#issuecomment-44763385
has some discussion on this. It could get somewhat expensive, but would only be
in the rare situations where this bug could be observed.

--


More information about the Digitalmars-d-bugs mailing list