title: How to move a struct with promise inside it?
body: <p>Recently I have read a part of "Concurrency in action" book concerning parallel quicksort implementation. I tried to check the code mentioned in the book and received an error on this part:</p>
  
  <pre><code>struct listPart
  {
      list&lt;T&gt; data;
      promise&lt;list&lt;T&gt;&gt; promise;
  };
  listPart newLowerPart;
  ...
  parts.push(move(newLowerPart));
  </code></pre>
  
  <p>The compiler gives the error </p>
  
  <blockquote>
    <p>std::promise::promise(const std::promise> &amp;) : attempting
    to reference a deleted function.</p>
  </blockquote>
  
  <p>The error is occured in generated copy constructor of listPart. 
  I guess trying to move newLowerPart it tries to use deleted copy constructor of promise. I thought creating custom copy constructor would help, but even an attempt to move promise inside it gave me the same error. Could you help me to solve this problem?
  Thank you in advance</p>