Boost logo

Boost Users :

From: Anders Hybertz (anders.hybertz_at_[hidden])
Date: 2003-10-17 04:05:34


Hi

Can I store boost::mutex'es in a map using the following constuct

typedef boost::shared_ptr<boost::mutex> MutexPtr;

typedef map< std::string, MutexPtr> MutexMap;

MutextMap mmap;

mmap["foo"] = MutexPtr( new boost::mutex );

I'm not sure that this is safe to do - the boost::mutex is
boost::noncopyable which might indicate that there could be a
potentional problem.

Thanks in advance



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