title: How to initialize a vector of a structure with unique_ptr?
body: <p>How to initialize a vector of a structure with unique_ptr? For example:</p>
  
  <pre><code>#include &lt;memory&gt;
  #include &lt;vector&gt;
  
  using namespace std;
  
  struct A
  {
      int i;
      unique_ptr&lt;int&gt; p;
  };
  
  int main()
  {
      vector&lt;A&gt; v{ { 10, make_unique&lt;int&gt;(10) } };
      // error above: cannot convert from initializer-list to vector&lt;A&gt;
  
      return 0;
  }
  </code></pre>