title: How to deal with noncopyable objects when inserting to containers in C++
body: <p>I'm looking for the best-practice of dealing with non-copyable objects.</p>
  
  <p>I have a mutex class, that obviously should not be copyable.
  I added a private copy constructor to enforce that.</p>
  
  <p>That broke the code - some places simply needed to be fixed, but I have a generic problem
  where a class, using the mutex either as a data member, or by inheritance, is being inserted into a container. </p>
  
  <p>This is usually happening during the container initialization, so the mutex is not initialized yet, and is therefore ok, but without a copy constructor it does not work. Changing the containers to contain pointers is not acceptable.</p>
  
  <p>Any advise?</p>