title: unordered_map emplace - how to create objects in place
body: <p>need to create unordered_map for integer and some user defined class - MyClass, where MyClass uses mutex for data access synchronisation, i.e. MyClass object can not be copied or moved.
  Is it possible to create such a map?
  How do I use emplace to create object of MyClass to avoid copy/move?</p>
  
  <pre class="lang-cpp prettyprint-override"><code>template&lt;typename T&gt;
  class MyClass {
    public:
      T pop() {
        std::unique_lock&lt;std::mutex&gt; lock(m_mutex);
        m_cv.wait(lock, [this]{return !m_queue.empty();});
        return m_queue.pop();
      }
      void push(T const&amp; x) {
        { 
          std::unique_lock&lt;std::mutex&gt; lock(m_mutex);
          m_queue.push(x) ;
        }
        m_cv.notify_one();
      }
    private:
      std::queue&lt;T&gt; m_queue ;
      std::mutex m_mutex ;
      std::condition_variable m_cv;
  };
  
  int main(){
    std::unordered_map&lt;int, MyClass&lt;float&gt;&gt; mmap;
    mmap.emplace(1, MyClass&lt;float&gt;{});
  }
  </code></pre>