https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114123
--- Comment #3 from Yaxun Liu ---
So, since vector has a ctor that accepts initializer list, that ctor is
favored over its copy ctor. With the initializer-list ctor, a is converted to
A(a) first, then {A(a)} is passed to that ctor.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114123
--- Comment #2 from Andrew Pinski ---
Also see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83264#c14 where Jason is
pinging the CWG about the interactions here.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114123
--- Comment #1 from Andrew Pinski ---
I think GCC's behavior here is correct, see PR 83264 .
Specifically https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83264#c11 .
And https://cplusplus.github.io/CWG/issues/1467.html .