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

--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Manuel López-Ibáñez from comment #1)
> Could we also print something better than <brace-enclosed initializer list>?

Like what?

Clang's approach seems to be to issue the same diagnostic for ill-formed
initializations X(1) and X{1}, just saying "no matching constructor for
initialization of 'X'" which dodges the issue.

> Is it really trying to convert to 'std::initializer_list<Y>' from 'int' or
> from 'std::initializer_list<int>'?

From int.

{1} is not a std::initializer_list<int> (but can be converted to it)

A brace-enclosed initializer list is not the same as a std::initializer_list.

Reply via email to