https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104282
--- Comment #8 from Fedor Chelnokov ---
One more inconsistency here:
struct A {
A() {}
A(A&&) = delete;
};
struct B : A { };
int main() {
// ok in GCC
B{ A{} };
// error in GCC
B b{ A{} };
}
GCC allows temporary creatio
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104282
--- Comment #7 from Andrew Pinski ---
(In reply to Jonathan Wakely from comment #4)
> I think there's any existing bug about this, and it's an open issue in the
> ABI
PR 98995 .
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104282
--- Comment #6 from Andrew Pinski ---
http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_active.html#2403
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104282
--- Comment #5 from Jonathan Wakely ---
Related to https://github.com/itanium-cxx-abi/cxx-abi/issues/107
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104282
--- Comment #4 from Jonathan Wakely ---
I think there's any existing bug about this, and it's an open issue in the ABI
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104282
--- Comment #3 from Fedor Chelnokov ---
Both Clang and GCC do not change their output either with `-std=c++20` or with
`-std=c++17` options. And both reject the program with -std=c++14`.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104282
--- Comment #2 from Andrew Pinski ---
That is c++17 requires Copy elision here while c++14 does not.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104282
--- Comment #1 from Andrew Pinski ---
Gcc 12 defaults to c++17. I have not looked but I suspect that is the
difference.