Boost logo

Boost :

Subject: [boost] [Atomic] Rationale for preventing copy construction/assignment?
From: Collin Dauphinee (collin_at_[hidden])
Date: 2013-05-29 16:22:09

I've recently noticed that boost::atomic<T> prevents assignment from
boost::atomic<T>, as well as copy construction. I'm having trouble
understanding why this decision was made, as it makes boost::atomic<T> (and
classes with a boost::atomic<T> member) very hard to store in containers,
and I can't immediately see any safety issues that would be caused by
allowing copy operations.

What is the rationale for not allowing assignment or copy construction from
another boost::atomic<T>?

Boost list run by bdawes at, gregod at, cpdaniel at, john at