You are assigning a value, which is not a copy of an atomic variable.
Copy assign means assigning a value of the same type. Atomic types have
these operators deleted, to make them non-copyable.
atomic(const atomic&) = delete;
atomic& operator=(const atomic&) = delete;
atomic& operator=(const atomic&) volatile = delete;
Bo Persson