title: Using vector of generic queues
body: <p>I made a generic safe thread queue- QueueTS
  And I have a class named PackagedEvent.
  I want to make a vector of queues. Each queue stores PackagedEvent.
  But its not possible to push a new queue to the vector and I dont understand why. The compiler says:</p>
  <pre><code>1&gt;C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\include\xmemory(671,82): error C2280: 'ds::QueueTS&lt;smartH::PackagedEvent&gt;::QueueTS(const ds::QueueTS&lt;smartH::PackagedEvent&gt; &amp;)': attempting to reference a deleted function
  1&gt;C:\me\studies\CPP\my_code\debug1\debug1\queueTS.hpp(30): message : compiler has generated 'ds::QueueTS&lt;smartH::PackagedEvent&gt;::QueueTS' here
  1&gt;C:\me\studies\CPP\my_code\debug1\debug1\queueTS.hpp(30,1): message : 'ds::QueueTS&lt;smartH::PackagedEvent&gt;::QueueTS(const ds::QueueTS&lt;smartH::PackagedEvent&gt; &amp;)': function was implicitly deleted because a data member invokes a deleted or inaccessible function 'std::mutex::mutex(const std::mutex &amp;)'
  1&gt;C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\include\mutex(92,5): message : 'std::mutex::mutex(const std::mutex &amp;)': function was explicitly deleted
  1&gt;C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\include\vector(682): message : see reference to function template instantiation 'void std::_Default_allocator_traits&lt;_Alloc&gt;::construct&lt;_Ty,_Ty&gt;(_Alloc &amp;,_Objty *const ,_Ty &amp;&amp;)' being compiled
  1&gt;        with
  1&gt;        [
  1&gt;            _Alloc=std::allocator&lt;ds::QueueTS&lt;smartH::PackagedEvent&gt;&gt;,
  1&gt;            _Ty=ds::QueueTS&lt;smartH::PackagedEvent&gt;,
  1&gt;            _Objty=ds::QueueTS&lt;smartH::PackagedEvent&gt;
  1&gt;        ]
  1&gt;C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\include\vector(687): message : see reference to function template instantiation 'void std::_Default_allocator_traits&lt;_Alloc&gt;::construct&lt;_Ty,_Ty&gt;(_Alloc &amp;,_Objty *const ,_Ty &amp;&amp;)' being compiled
  1&gt;        with
  1&gt;        [
  1&gt;            _Alloc=std::allocator&lt;ds::QueueTS&lt;smartH::PackagedEvent&gt;&gt;,
  1&gt;            _Ty=ds::QueueTS&lt;smartH::PackagedEvent&gt;,
  1&gt;            _Objty=ds::QueueTS&lt;smartH::PackagedEvent&gt;
  1&gt;        ]
  1&gt;C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\include\vector(700): message : see reference to function template instantiation 'void std::vector&lt;ds::QueueTS&lt;smartH::PackagedEvent&gt;,std::allocator&lt;ds::QueueTS&lt;smartH::PackagedEvent&gt;&gt;&gt;::_Emplace_back_with_unused_capacity&lt;_Ty&gt;(_Ty &amp;&amp;)' being compiled
  1&gt;        with
  1&gt;        [
  1&gt;            _Ty=ds::QueueTS&lt;smartH::PackagedEvent&gt;
  1&gt;        ]
  </code></pre>
  <pre><code>
  int main()
  {
      vector&lt;QueueTS&lt; PackagedEvent&gt;&gt; vec;
  
      vec.push_back(QueueTS&lt; PackagedEvent&gt;());
      return 1;
  }
  </code></pre>
  <pre><code>class PackagedEvent
      {
      private:
          shared_ptr&lt;Event&gt; m_eventPtr;
          size_t m_destination;
      public:
          PackagedEvent();
          PackagedEvent(const shared_ptr&lt;Event&gt;&amp; _event, const size_t&amp; _destination);
          shared_ptr&lt;Event&gt; getEventPtr() const;
          size_t getDestination() const;
          void setEventPtr(const shared_ptr&lt;Event&gt;&amp; _event);
          void setDestination(const size_t&amp; _destination);
      };
  </code></pre>
  <pre><code>template &lt;typename T&gt;
      class QueueTS
      {
      public:
          QueueTS();
          ~QueueTS() = default;
          int enqueue(const T&amp; _t);
          int dequeue(T&amp; _ptrT);
          void stop();
          int size();
      private:
  
          queue&lt;T&gt; m_mainQueue;
          mutex m_mutex;
          condition_variable m_cv;
          bool m_power;
      }; //QueueTS
  </code></pre>