title: C++ std::unique_ptr stored inside std::map use of deleted function ill formed
body: <p>I have the following code which won't compile and it's Friday and I'm a bit frazzled.</p>
  
  <pre><code>#include &lt;string&gt;
  #include &lt;memory&gt;
  #include &lt;utility&gt;
  #include &lt;map&gt;
  
  template&lt; typename T, typename ...Args &gt;
  std::unique_ptr&lt; T &gt; make_unique( Args &amp;&amp; ...args )
  {
      return std::unique_ptr&lt; T &gt;( new T( std::forward&lt; Args &gt;( args )... ) );
  }
  
  struct A
  {
  };
  
  std::map&lt; std::string, std::unique_ptr&lt; A &gt; &gt; _map = { { "A", make_unique&lt; A &gt;() } }; // &lt;-- ERROR!!
  </code></pre>
  
  <p>The following compiles without a problem</p>
  
  <pre><code>int main()
  {
      std::pair&lt; std::string, std::unique_ptr&lt; A &gt; &gt; p { "B", make_unique&lt; A &gt;() };
      _map.insert( std::make_pair( "C", make_unique&lt; A &gt;() ) );
  }
  </code></pre>
  
  <p>The error I'm getting is (roughly, as removed g++ fluff)</p>
  
  <pre><code>use of deleted function 'constexpr std::pair&lt;...&gt;( const st::pair&lt;...&gt; &amp; )
  'constexp std::pair&lt;...&gt;::pair( const std::pair&lt;...&gt; &amp; ) is implicitly deleted because the default definition would be illegal.
  </code></pre>
  
  <p>Argghh!!
  Just read this in the c++11 standard.</p>
  
  <blockquote>
    <p>When an aggregate is initialized by an initializer list, as specified
    in 8.5.4, the elements of the initializer list are taken as
    initializers for the members of the aggregate, in increasing subscript
    or member order. Each member is <strong>copy-initialized</strong> from the
    corresponding initializer-clause</p>
  </blockquote>
  
  <p>bummer!!!</p>
  
  <p>Anyone know if it's just plain impossible with initialiser lists?</p>