title: Boost, pointer to a mutex, will that work? boost::mutex and std::vector, noncopyable issue
body: <p>The following code will give me an error, since boost::mutex is noncopyable, while xyz.push_back() is a copy constructor. </p>
  
  <pre><code>class XYZ
  {
      public:
          double x;
          boost::mutex x_mutex;
  }
  
  vector&lt;XYZ&gt; xyz;
  xyz.push_back(XYZ());
  </code></pre>
  
  <p>So I tried something like this, </p>
  
  <pre><code>class XYZ
  {
      public:
          double x;
          boost::mutex * x_mutex;
  }
  
  vector&lt;XYZ&gt; xyz;
  xyz.push_back(XYZ());
  </code></pre>
  
  <p>It complies with no error, but the question is "will that mutex actually work as it should be?" Is this a good way to encapsulate a mutex inside a class, and then create a vector of that class?</p>
  
  <p>Thanks.</p>