title: c++ initializer_list and shared_ptr behavior
body: <p>I'm testing vs2013 c++ initializer_list.</p>
  
  <p>The code below can be compiled.
  But crashes when i run exe.</p>
  
  <pre><code>#include &lt;memory&gt;
  #include &lt;iostream&gt;
  
  class Base {};
  
  class Derived : public Base {};
  
  void DoSomething(std::initializer_list&lt;std::shared_ptr&lt;Base&gt; &gt; list)
  {
  }
  
  int main()
  {
    auto ip = std::make_shared&lt;Derived&gt;();
  
    std::cout &lt;&lt; "use_count=" &lt;&lt; ip.use_count() &lt;&lt; std::endl;
  
    DoSomething({ip, std::make_shared&lt;Derived&gt;()}); // ng
    // DoSomething({ip, std::make_shared&lt;Base&gt;()}); // ok
    // DoSomething({std::make_shared&lt;Derived&gt;(), ip}); // ok
  
    std::cout &lt;&lt; "use_count=" &lt;&lt; ip.use_count() &lt;&lt; std::endl;
  }
  </code></pre>
  
  <p>Compiles.</p>
  
  <pre><code>C:\...&gt;cl.exe /EHsc test.cpp
  Microsoft(R) C/C++ Optimizing Compiler Version 18.00.21005.1 for x86
  Copyright (C) Microsoft Corporation.  All rights reserved.
  
  test.cpp
  Microsoft (R) Incremental Linker Version 12.00.21005.1
  Copyright (C) Microsoft Corporation.  All rights reserved.
  
  /out:test.exe
  test.obj
  
  C:\...&gt;
  </code></pre>
  
  <p>I expected the output like this.
  g++4.8.2 works like this.</p>
  
  <pre><code>c:\...&gt;test.exe
  use_count=1
  use_count=1
  </code></pre>
  
  <p>However, looks like this.</p>
  
  <pre><code>c:\...&gt;test.exe
  use_count=1
  use_count=0 // or some random value like 3719232 and displayed crash dialog. 
  </code></pre>
  
  <p>And, Modifying one line of the code above, This works good.</p>
  
  <pre><code>DoSomething({std::make_shared&lt;Derived&gt;(), ip});
  </code></pre>
  
  <p>Is this a bug or normal behavior of vs2013 initializer_list ?</p>