List-initialization of an array without temporaries - not working in GCC : <p>Consider the following contrived example</p>

<pre><code>struct A {
    A(int) {}
    A(const A&amp;) = delete;
    ~A() {}
};

struct B {
    A a[2] = {{1}, {2}};
};

int main() {
    B b;
}
</code></pre>

<p>It compiles fine in <strong>clang</strong> (any version) but not in <strong>GCC</strong> (any version, any standard >= C++11)</p>

<pre><code>&lt;source&gt;: In constructor 'constexpr B::B()':
&lt;source&gt;:7:8: error: use of deleted function 'A::A(const A&amp;)'
 struct B {
        ^
&lt;source&gt;:3:5: note: declared here
     A(const A&amp;) = delete;
     ^
&lt;source&gt;: In function 'int main()':
&lt;source&gt;:12:7: note: synthesized method 'constexpr B::B()' first required here
     B b;
       ^
</code></pre>

<p><a href="https://gcc.godbolt.org/z/DneRbb" rel="noreferrer">LIVE DEMO</a></p>

<p>When A's destructor is commented out, it compiles fine also in GCC.</p>

<p><strong>Question is</strong> - who is right, clang or GCC, and why?</p>

<p>Initially I thought GCC is wrong, but then I saw <a href="https://timsong-cpp.github.io/cppwp/n3337/dcl.init.list#5" rel="noreferrer">[dcl.init.list]/5</a> which states that temporaries are created. Though I'm not sure if that applies here or if there's another rule that overrides this.</p>
