title: auto type deduction with uniform initialisation syntax c++11 vs c++17
body: <p>I was trying to test auto type deduction. Both Scott Meyers (Effective modern C++) and Bjarne Stroustrup's C++ Programming Language mention that doing</p>
  <p><code>auto val {10};</code></p>
  <p>will deduce val to be of type &quot;initialisation list&quot;.</p>
  <p>I read that this was changed in C++17 so that if there is only one element in the list, then auto will deduce to a type of that element instead.</p>
  <p>However, I tested this with recent gcc (v10) and clang (V11) compilers by explicitly specifying the C++11 standard and I didn't see the behaviour expected</p>
  <pre><code>auto A {1.0};
  std::cout &lt;&lt; typeid(A).name();
  </code></pre>
  <p>prints &quot;d&quot; to screen</p>
  <p>whereas</p>
  <pre><code>auto A={1.0};
  std::cout &lt;&lt; typeid(A).name();
  </code></pre>
  <p>prints &quot;St16initializer_listIdE&quot; to screen.</p>
  <p>This is the same regardless of whether I specity</p>
  <pre><code>gcc -std=c++11
  </code></pre>
  <p>or</p>
  <pre><code>gcc -std=c++17
  </code></pre>
  <p>and similarly for clang.</p>
  <p>I understand that it was changed in C++17, but why then do I not see the &quot;old&quot; behaviour? Or am I misunderstanding?</p>
  <p>Thanks</p>