title: Deleted function unique_ptr
body: <p>I don't understand the error output at all, I wrote a single class that generates it.</p>
  
  <p>UserQueues.h</p>
  
  <pre><code>#ifndef USERQUEUES_H
  #define USERQUEUES_H
  
  #include &lt;deque&gt;
  #include &lt;vector&gt;
  #include &lt;memory&gt;
  #include "Job.h"
  
  class UserQueues 
  {
      public:
          typedef std::unique_ptr&lt;Job&gt; JobPtr;
          typedef std::deque&lt;JobPtr&gt; JobDeque;
  
      public:
          UserQueues();
          void printDeques();
          void addToDeque(JobPtr job, int queueId);
  
      public:
          const uint QUEUE_QTY = 3;
  
      private:
          std::vector&lt;JobDeque&gt; _jobDeques;
  };
  
  #endif
  </code></pre>
  
  <p>UserQueues.cpp</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include "UserQueues.h"
  
  UserQueues::UserQueues() : 
      _jobDeques()
  {
      for(unsigned int idx = 0 ; idx &lt; QUEUE_QTY ; ++idx)
      {
          _jobDeques.push_back(JobDeque());
      }
  }
  
  void UserQueues::printDeques()
  {
      for (std::size_t idx = 0; idx &lt; _jobDeques.size(); ++idx)
      {
          std::cout &lt;&lt; "[";
  
          for(std::size_t jdx = 0 ; jdx &lt; _jobDeques[idx].size() ; ++jdx)
          {
              std::cout &lt;&lt; _jobDeques[idx].at(jdx)-&gt;getArrivalTime();
  
              if(jdx != (_jobDeques[idx].size() - 1))
              {
                  std::cout &lt;&lt; ", ";
              }
          }
          std::cout &lt;&lt; "]" &lt;&lt; std::endl;
      } 
  }
  
  void UserQueues::addToDeque(JobPtr job, int queueId)
  {
      _jobDeques[0].push_front(std::move(job));
  }
  </code></pre>
  
  <p>Output : </p>
  
  <pre><code>09:31:34 **** Incremental Build of configuration Debug for project etsmtl-log710-lab02 ****
  make all 
  make: Warning: File `src/Job.d' has modification time 1.7e+04 s in the future
  Building file: ../src/Job.cpp
  Invoking: GCC C++ Compiler
  g++ -std=c++0x -I"/home/patrickz/git/etsmtl-log710-lab02/include" -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"src/Job.d" -MT"src/Job.d" -o "src/Job.o" "../src/Job.cpp"
  Finished building: ../src/Job.cpp
  
  Building file: ../src/UserQueues.cpp
  Invoking: GCC C++ Compiler
  g++ -std=c++0x -I"/home/patrickz/git/etsmtl-log710-lab02/include" -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"src/UserQueues.d" -MT"src/UserQueues.d" -o "src/UserQueues.o" "../src/UserQueues.cpp"
  In file included from /usr/include/c++/4.7/deque:63:0,
                   from /home/patrickz/git/etsmtl-log710-lab02/include/UserQueues.h:4,
                   from ../src/UserQueues.cpp:2:
  /usr/include/c++/4.7/bits/stl_construct.h: In instantiation of ‘void std::_Construct(_T1*, _Args&amp;&amp; ...) [with _T1 = std::unique_ptr&lt;Job&gt;; _Args = {const std::unique_ptr&lt;Job, std::default_delete&lt;Job&gt; &gt;&amp;}]’:
  /usr/include/c++/4.7/bits/stl_uninitialized.h:77:3:   required from ‘static _ForwardIterator std::__uninitialized_copy&lt;_TrivialValueTypes&gt;::__uninit_copy(_InputIterator, _InputIterator, _ForwardIterator) [with _InputIterator = std::_Deque_iterator&lt;std::unique_ptr&lt;Job&gt;, const std::unique_ptr&lt;Job&gt;&amp;, const std::unique_ptr&lt;Job&gt;*&gt;; _ForwardIterator = std::_Deque_iterator&lt;std::unique_ptr&lt;Job&gt;, std::unique_ptr&lt;Job&gt;&amp;, std::unique_ptr&lt;Job&gt;*&gt;; bool _TrivialValueTypes = false]’
  /usr/include/c++/4.7/bits/stl_uninitialized.h:119:41:   required from ‘_ForwardIterator std::uninitialized_copy(_InputIterator, _InputIterator, _ForwardIterator) [with _InputIterator = std::_Deque_iterator&lt;std::unique_ptr&lt;Job&gt;, const std::unique_ptr&lt;Job&gt;&amp;, const std::unique_ptr&lt;Job&gt;*&gt;; _ForwardIterator = std::_Deque_iterator&lt;std::unique_ptr&lt;Job&gt;, std::unique_ptr&lt;Job&gt;&amp;, std::unique_ptr&lt;Job&gt;*&gt;]’
  /usr/include/c++/4.7/bits/stl_uninitialized.h:260:63:   required from ‘_ForwardIterator std::__uninitialized_copy_a(_InputIterator, _InputIterator, _ForwardIterator, std::allocator&lt;_Tp&gt;&amp;) [with _InputIterator = std::_Deque_iterator&lt;std::unique_ptr&lt;Job&gt;, const std::unique_ptr&lt;Job&gt;&amp;, const std::unique_ptr&lt;Job&gt;*&gt;; _ForwardIterator = std::_Deque_iterator&lt;std::unique_ptr&lt;Job&gt;, std::unique_ptr&lt;Job&gt;&amp;, std::unique_ptr&lt;Job&gt;*&gt;; _Tp = std::unique_ptr&lt;Job&gt;]’
  /usr/include/c++/4.7/bits/stl_deque.h:841:9:   required from ‘std::deque&lt;_Tp, _Alloc&gt;::deque(const std::deque&lt;_Tp, _Alloc&gt;&amp;) [with _Tp = std::unique_ptr&lt;Job&gt;; _Alloc = std::allocator&lt;std::unique_ptr&lt;Job&gt; &gt;; std::deque&lt;_Tp, _Alloc&gt; = std::deque&lt;std::unique_ptr&lt;Job&gt; &gt;]’
  /usr/include/c++/4.7/bits/stl_construct.h:77:7:   required from ‘void std::_Construct(_T1*, _Args&amp;&amp; ...) [with _T1 = std::deque&lt;std::unique_ptr&lt;Job&gt; &gt;; _Args = {std::deque&lt;std::unique_ptr&lt;Job, std::default_delete&lt;Job&gt; &gt;, std::allocator&lt;std::unique_ptr&lt;Job, std::default_delete&lt;Job&gt; &gt; &gt; &gt;&amp;}]’
  /usr/include/c++/4.7/bits/stl_uninitialized.h:77:3:   [ skipping 2 instantiation contexts ]
  /usr/include/c++/4.7/bits/stl_uninitialized.h:260:63:   required from ‘_ForwardIterator std::__uninitialized_copy_a(_InputIterator, _InputIterator, _ForwardIterator, std::allocator&lt;_Tp&gt;&amp;) [with _InputIterator = std::deque&lt;std::unique_ptr&lt;Job&gt; &gt;*; _ForwardIterator = std::deque&lt;std::unique_ptr&lt;Job&gt; &gt;*; _Tp = std::deque&lt;std::unique_ptr&lt;Job&gt; &gt;]’
  /usr/include/c++/4.7/bits/stl_uninitialized.h:283:69:   required from ‘_ForwardIterator std::__uninitialized_move_if_noexcept_a(_InputIterator, _InputIterator, _ForwardIterator, _Allocator&amp;) [with _InputIterator = std::deque&lt;std::unique_ptr&lt;Job&gt; &gt;*; _ForwardIterator = std::deque&lt;std::unique_ptr&lt;Job&gt; &gt;*; _Allocator = std::allocator&lt;std::deque&lt;std::unique_ptr&lt;Job&gt; &gt; &gt;]’
  /usr/include/c++/4.7/bits/vector.tcc:410:6:   required from ‘void std::vector&lt;_Tp, _Alloc&gt;::_M_emplace_back_aux(_Args&amp;&amp; ...) [with _Args = {std::deque&lt;std::unique_ptr&lt;Job, std::default_delete&lt;Job&gt; &gt;, std::allocator&lt;std::unique_ptr&lt;Job, std::default_delete&lt;Job&gt; &gt; &gt; &gt;}; _Tp = std::deque&lt;std::unique_ptr&lt;Job&gt; &gt;; _Alloc = std::allocator&lt;std::deque&lt;std::unique_ptr&lt;Job&gt; &gt; &gt;]’
  /usr/include/c++/4.7/bits/vector.tcc:102:4:   required from ‘void std::vector&lt;_Tp, _Alloc&gt;::emplace_back(_Args&amp;&amp; ...) [with _Args = {std::deque&lt;std::unique_ptr&lt;Job, std::default_delete&lt;Job&gt; &gt;, std::allocator&lt;std::unique_ptr&lt;Job, std::default_delete&lt;Job&gt; &gt; &gt; &gt;}; _Tp = std::deque&lt;std::unique_ptr&lt;Job&gt; &gt;; _Alloc = std::allocator&lt;std::deque&lt;std::unique_ptr&lt;Job&gt; &gt; &gt;]’
  /usr/include/c++/4.7/bits/stl_vector.h:900:9:   required from ‘void std::vector&lt;_Tp, _Alloc&gt;::push_back(std::vector&lt;_Tp, _Alloc&gt;::value_type&amp;&amp;) [with _Tp = std::deque&lt;std::unique_ptr&lt;Job&gt; &gt;; _Alloc = std::allocator&lt;std::deque&lt;std::unique_ptr&lt;Job&gt; &gt; &gt;; std::vector&lt;_Tp, _Alloc&gt;::value_type = std::deque&lt;std::unique_ptr&lt;Job&gt; &gt;]’
  ../src/UserQueues.cpp:9:40:   required from here
  /usr/include/c++/4.7/bits/stl_construct.h:77:7: error: use of deleted function ‘std::unique_ptr&lt;_Tp, _Dp&gt;::unique_ptr(const std::unique_ptr&lt;_Tp, _Dp&gt;&amp;) [with _Tp = Job; _Dp = std::default_delete&lt;Job&gt;; std::unique_ptr&lt;_Tp, _Dp&gt; = std::unique_ptr&lt;Job&gt;]’
  In file included from /usr/include/c++/4.7/memory:86:0,
                   from /home/patrickz/git/etsmtl-log710-lab02/include/UserQueues.h:6,
                   from ../src/UserQueues.cpp:2:
  /usr/include/c++/4.7/bits/unique_ptr.h:262:7: error: declared here
  make: *** [src/UserQueues.o] Error 1
  
  09:31:36 Build Finished (took 2s.52ms)
  </code></pre>