Narrowing conversion in pair with braced initializer compiling if second attribute is not braced-initialized
<p>Since c++11, narrowing conversion is not allowed in <a href="http://en.cppreference.com/w/cpp/language/list_initialization">list initialization</a> (including <a href="http://en.cppreference.com/w/cpp/language/aggregate_initialization">aggregate initialization</a>). So basically:</p>

<pre><code>char c{1000}; // Does not compile with g++, clang, vc
</code></pre>

<p>But:</p>

<pre><code>std::pair&lt;char, double&gt; p{1000, 1.0};
</code></pre>

<p>Compiles with all compiler?</p>

<p>But:</p>

<pre><code>std::pair&lt;char, double&gt; p{1000, {1.0}};
</code></pre>

<p>Does not compile with VC (error C2398), gives a warning with clang and compiles silently with g++...</p>

<p>I would have expected VC behavior everywhere, i.e. a non-allowed narrowing conversion throwing an error. Which is compiler is right?</p>

<hr>

<p>On the other hand, none of the variable declarations in the following snippets compile:</p>

<pre><code>struct X {
    char c;
    double d;
};

X x1{999, 1.0};
X x2{999, {1.0}};

struct Y {
    char c;
    double d;
    Y (char c, double d) : c(c), d(d) { }
};

Y y1{999, 1.0};
Y y2{999, {1.0}};
</code></pre>

<p>So one of my guess may be that there is something special about <code>std::pair</code>? Something that would also narrowing braced-initialization?</p>