title: Error C2664 cannot convert argument 1 from 'initializer list' to 'A &&' (compiles on VS2017 but not on VS2015)
body: <p>I have an issue with this code. I can compile it when I use Visual Studio 2017 (v141) platform toolset. However, when I switch to Visual Studio 2015 (v140), I hit this error:</p>
  <p>Error   C2664   'void std::vector&lt;A,std::allocator&lt;_Ty&gt;&gt;::push_back(const A &amp;)': cannot convert argument 1 from 'initializer list' to 'A &amp;&amp;'</p>
  <pre class="lang-cpp prettyprint-override"><code>#include &lt;vector&gt;
  #include &lt;iostream&gt;
  
  struct A {
      double i;
      double j;
      int k = -1;
  };
      
  int main()
  {
      std::vector&lt;A&gt; _object_rects;
      
      double i = 150;
      double j = 200;
      
      _object_rects.push_back({
          i,
          j });
      
      std::cout &lt;&lt; &quot;print structure: &quot; &lt;&lt; std::endl;
      
      std::cout &lt;&lt; _object_rects[0].i &lt;&lt; std::endl;
      std::cout &lt;&lt; _object_rects[0].j &lt;&lt; std::endl;
      std::cout &lt;&lt; _object_rects[0].k &lt;&lt; std::endl;
      
      system(&quot;pause&quot;);
      
      return 0;
  }
  </code></pre>
  <p>Appreciate any help. Thanks.</p>