title: Creating a future from intermediate futures?
body: <p>In the following sample code I want to create an <code>Item</code> object from a <code>Component</code>:</p>
  
  <pre><code>struct Component { };
  
  struct Item {
      explicit Item(Component component) : comp(component) {}    
      Component comp;
  };
  
  struct Factory {
      static std::future&lt;Item&gt; get_item() {
          std::future&lt;Component&gt; component = get_component();        
          // how to get a std::future&lt;Item&gt; ?
      }
  
      std::future&lt;Component&gt; get_component();
  };
  </code></pre>
  
  <p>How do I go from <code>std::future&lt;Component&gt;</code> to <code>std::future&lt;Item&gt;</code>?</p>
  
  <p><br><b>Update:</b> removed my first idea (which was thread-based) from the question and posted an answer.</p>