title: Can I assign/move a new value into a unique_ptr inside a tuple?
body: <p>The need to do this has arisen since I want <code>run</code> to use all the other tuple elements. Basically, I have a vector of these tuples to form a kind of table. I couldn't figure out myself how to properly do this.</p>
  
  <p><strong>Edit:</strong> Apparently the previous, simplified code gives a different error, so ignore that. This code here is how I have it in my code. (Sorry)</p>
  
  <pre><code>class GUI {
      using win_t = std::tuple&lt;sf::RenderWindow&amp;, Container&amp;, std::unique_ptr&lt;std::thread&gt;, std::condition_variable&gt;;
      enum { WINDOW, CONT, THREAD, CV }
  
      std::vector&lt;win_t&gt; windows;        
  
      void run(win_t &amp;win);
  
      win_t &amp;addWindow(sf::RenderWindow &amp; window, Container &amp; c) {
          windows.emplace_back(std::forward_as_tuple(window, c, nullptr, std::condition_variable()));
          win_t &amp;entry = windows.back();
          std::get&lt;GUI::THREAD&gt;(entry) = std::make_unique&lt;std::thread&gt;(&amp;GUI::run, this, entry); // error is on this line
          return entry;
      }
  }
  </code></pre>
  
  <p>And the Error I'm getting:</p>
  
  <pre><code>Error   C2280   'std::tuple&lt;sf::RenderWindow &amp;,Container &amp;,std::unique_ptr&lt;std::thread,std::default_delete&lt;_Ty&gt;&gt;,std::condition_variable&gt;::tuple(const std::tuple&lt;sf::RenderWindow &amp;,Container &amp;,std::unique_ptr&lt;_Ty,std::default_delete&lt;_Ty&gt;&gt;,std::condition_variable&gt; &amp;)': attempting to reference a deleted function dpomodorivs c:\program files (x86)\microsoft visual studio 14.0\vc\include\tuple    75`
  </code></pre>