title: Capture and move a unique_ptr in a c++14 lambda expression
body: <p>I am capturing a unique_ptr in a lambda expression this way:  </p>
  
  <pre><code>auto str = make_unique&lt;string&gt;("my string");
  auto lambda = [ capturedStr = std::move(str) ] {
     cout &lt;&lt; *capturedStr.get() &lt;&lt; endl;
  };
  lambda();
  </code></pre>
  
  <p>It works great until I try to move <code>capturedStr</code> to another unique_ptr. For instance, the following is not working:</p>
  
  <pre><code>auto str = make_unique&lt;string&gt;("my string");
  auto lambda = [ capturedStr = std::move(str) ] {
      cout &lt;&lt; *capturedStr.get() &lt;&lt; endl;
      auto str2 = std::move(capturedStr); // &lt;--- Not working, why?
  };
  lambda();
  </code></pre>
  
  <p>Here is the output from the compiler:</p>
  
  <pre><code>.../test/main.cpp:11:14: error: call to implicitly-deleted copy
  constructor of 'std::__1::unique_ptr&lt;std::__1::basic_string&lt;char&gt;,
  std::__1::default_delete&lt;std::__1::basic_string&lt;char&gt; &gt; &gt;'
          auto str2 = std::move(capturedStr);
               ^      ~~~~~~~~~~~~~~~~~~~~~~ ../include/c++/v1/memory:2510:31: note: copy constructor is implicitly
  deleted because 'unique_ptr&lt;std::__1::basic_string&lt;char&gt;,
  std::__1::default_delete&lt;std::__1::basic_string&lt;char&gt; &gt; &gt;' has a
  user-declared move constructor
      _LIBCPP_INLINE_VISIBILITY unique_ptr(unique_ptr&amp;&amp; __u) _NOEXCEPT
                                ^ 1 error generated.
  </code></pre>
  
  <p>Why isn't it possible to move <code>capturedStr</code>?</p>