title: How to use a boost::mutex as the mapped type in std::map?
body: <p>I would like to lock the keys/index in another map like this:</p>
  
  <pre><code>std::map&lt;int, boost::mutex&gt; pointCloudsMutexes_;
  pointCloudsMutexes_[index].lock();
  </code></pre>
  
  <p>However, I am getting the following error:</p>
  
  <pre><code>/usr/include/c++/4.8/bits/stl_pair.h:113: error: no matching function for call to 'boost::mutex::mutex(const boost::mutex&amp;)'
         : first(__a), second(__b) { }
                                 ^
  </code></pre>
  
  <p>It seems to work with <code>std::vector</code>, but not with <code>std::map</code>. What am I doing wrong?</p>