https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92869

--- Comment #2 from Igor Chorazewicz <igor.chorazewicz at intel dot com> ---
Hm, from what I thought C++11 (not sure about C++14 but probably also) allows
ctors to be explicitly defaulted for aggregates. See C++11 [dcl.init.aggr]. 

Consider the following code:

#include <array>
#include <type_traits>
#include <iostream>

template <typename T, std::size_t N>
struct A {
    A() = default;
    A(const A &) = default;
    A(A &&) = default;

    T arr[N];   
};

int main()
{
    A<int, 3> a {{1,2,3}};
}

This code compiles with g++ 9.2 for -std=c++11, -std=c++14, std=c++17 (but not
for -std=c++2a) and fails to compile for g++ 10 for all standards

Reply via email to