title: Forward reservation of memory in tree-like structure
body: <p>How to nicely reserve memory of tree-like structure? Let's say that this would be implemented by STL vectors:</p>
  
  <pre><code>struct Leaf
  {
      int val;
  };
  
  struct Branch
  {
      std::vector&lt;Leaf&gt; leaves;
  };
  </code></pre>
  
  <p>Now, I can reserve some memory for vector of <code>Branch</code>es</p>
  
  <pre><code>std::vector&lt;Branch&gt; branches;
  branches.reserve(10);
  </code></pre>
  
  <p>But how to reserve memory for <code>leaves</code> at the same time (not for example during construction of <code>Branch</code> objects)?</p>