http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53657

--- Comment #12 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-06-20 
15:20:29 UTC ---
Possibly a front end bug, not sure.

Here's a reduced form that G++ rejects, Clang accepts:

template<typename T>
struct pair
{
    constexpr pair(const pair&) = default;
    pair(pair&&) = default;

    pair() : t() { }

    T t;
};

struct string {
    string(const string&) { }
    string(string&&) = default;
    string() = default;
};

int main()
{
    typedef pair<const string> P;
    P p[] = { P(), P() };
}

Reply via email to