29 May
2013
29 May
'13
8:22 p.m.
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>?