An Issue I Wish To Raise Awareness On
Kagamin via Digitalmars-d
digitalmars-d at puremagic.com
Thu Jul 20 03:16:21 PDT 2017
On Wednesday, 19 July 2017 at 21:50:32 UTC, Petar Kirov
[ZombineDev] wrote:
> Note that this doesn't play well with regular [1] value types
> becuase e.g. you don't have control over the synthesized
> bit-blit for this(this) and so you can't assume that structs
> with a single pointer member are updated atomically, even if
> would write the opAssign that way. In C++17 atomic_shared_ptr
> has it's copy-constructor and assign operator deleted. You can
> only do atomic<T> like ops with it and derive a plain
> shared_ptr<T> from it, kind-of like core.atomic's
> HeadUnshared(T).
Huh? Why opAssign can't just do what atomic<T> does?
More information about the Digitalmars-d
mailing list