Boost logo

Boost Users :

Subject: Re: [Boost-users] boost atomic query
From: Daniel Anderson (wonixen_at_[hidden])
Date: 2011-10-18 14:17:26


2011/10/18 Sean Farrow <sean.farrow_at_[hidden]>

> 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_at_[hidden]
> 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*


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net