Hi: I'm just starting to use boost atomic. I need to protect an std::map. If I had: boost::atomic<std;:map<int, int> > test; Would I need to protect this with a mutex, or is the fact that the variable is atomic enough? Cheers SEean.
2011/10/18 Sean Farrow <sean.farrow@seanfarrow.co.uk>
Hi: ****
I’m just starting to use boost atomic.****
I need to protect an std::map.****
If I had: boost::atomic<std;:map<int, int> > test;****
Would I need to protect this with a mutex, or is the fact that the variable is atomic enough?
look into the limitation section you will see: Using non-POD-classes as template paramater to atomic<T> results in undefined behavior ****
Cheers****
SEean.****
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
Daniel Anderson -- Aucun n'est plus désespérément esclave que ceux qui croient à tort qu'ils sont libres. *Johann Wolfgang von Goethe*
participants (2)
-
Daniel Anderson
-
Sean Farrow