title: Initializer-list-constructing a vector of noncopyable (but movable) objects
body: <p>One can <code>push_back</code> rvalues of a noncopyable-but-movable type into a vector of that type:</p>
  
  <pre><code>#include &lt;vector&gt;
  
  struct S
  {
      S(int);
      S(S&amp;&amp;);
  };
  
  int main()
  {
      std::vector&lt;S&gt; v;
      v.push_back(S(1));
      v.push_back(S(2));
      v.push_back(S(3));
  }
  </code></pre>
  
  <p>However, when I try to initializer-list-construct the vector with the same rvalues, I get errors about a copy constructor being required:</p>
  
  <pre><code>#include &lt;vector&gt;
  
  struct S
  {
      S(int);
      S(S&amp;&amp;);
  };
  
  int main()
  {
      std::vector&lt;S&gt; v = {S(1), S(2), S(3)};
  }
  </code></pre>
  
  <p>I get the following errors with GCC 4.7:</p>
  
  <pre><code>In file included from include/c++/4.7.0/vector:63:0,
                   from test.cpp:1:
  include/c++/4.7.0/bits/stl_construct.h: In instantiation of 'void std::_Construct(_T1*, _Args&amp;&amp; ...) [with _T1 = S, _Args = {const S&amp;}]':
  include/c++/4.7.0/bits/stl_uninitialized.h:77:3:   required from 'static _ForwardIterator std::__uninitialized_copy&lt;_TrivialValueTypes&gt;::__uninit_copy(_InputIterator, _InputIterator, _ForwardIterator) [with _InputIterator = const S*, _ForwardIterator = S*, bool _TrivialValueTypes = false]'
  include/c++/4.7.0/bits/stl_uninitialized.h:119:41:   required from '_ForwardIterator std::uninitialized_copy(_InputIterator, _InputIterator, _ForwardIterator) [with _InputIterator = const S*, _ForwardIterator = S*]'
  include/c++/4.7.0/bits/stl_uninitialized.h:260:63:   required from '_ForwardIterator std::__uninitialized_copy_a(_InputIterator, _InputIterator, _ForwardIterator, std::allocator&lt;_Tp&gt;&amp;) [with _InputIterator = const S*, _ForwardIterator = S*, _Tp = S]'
  include/c++/4.7.0/bits/stl_vector.h:1185:4:   required from 'void std::vector&lt;_Tp, _Alloc&gt;::_M_range_initialize(_ForwardIterator, _ForwardIterator, std::forward_iterator_tag) [with _ForwardIterator = const S*, _Tp = S, _Alloc = std::allocator&lt;S&gt;]'
  include/c++/4.7.0/bits/stl_vector.h:362:2:   required from 'std::vector&lt;_Tp, _Alloc&gt;::vector(std::initializer_list&lt;_Tp&gt;, const allocator_type&amp;) [with _Tp = S, _Alloc = std::allocator&lt;S&gt;, std::vector&lt;_Tp, _Alloc&gt;::allocator_type = std::allocator&lt;S&gt;]'
  test.cpp:11:41:   required from here
  include/c++/4.7.0/bits/stl_construct.h:77:7: error: no matching function for call to 'S::S(const S&amp;)'
  include/c++/4.7.0/bits/stl_construct.h:77:7: note: candidates are:
  test.cpp:6:5: note: S::S(S&amp;&amp;)
  test.cpp:6:5: note:   no known conversion for argument 1 from 'const S' to 'S&amp;&amp;'
  test.cpp:5:5: note: S::S(int)
  test.cpp:5:5: note:   no known conversion for argument 1 from 'const S' to 'int'
  </code></pre>
  
  <p>Should this be allowed? I see no technical obstacles to it being allowed, but I don't have the Standard handy at the moment...</p>