https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106599
--- Comment #5 from Jonathan Wakely ---
This delegating constructor example seems like a third case of
https://wg21.link/cwg2403
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106599
--- Comment #4 from Fedor Chelnokov ---
And if one deletes copy constructor of A:
struct A {
constexpr A() = default;
constexpr A(const A&) = delete;
constexpr A(int) : A(A()) {}
};
A a(2);
Then Clang rejects the program, b
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106599
--- Comment #3 from Jonathan Wakely ---
(In reply to Fedor Chelnokov from comment #0)
> So we need to consider the constructors, and select A(const A&) : v(1)
We do select that, but then for C++17 (and later) the copy is elided, which is
permit
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106599
Jonathan Wakely changed:
What|Removed |Added
CC||jlame646 at gmail dot com
--- Comment
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106599
--- Comment #1 from Andrew Pinski ---
MSVC also rejects it.