https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90190
Bug ID: 90190 Summary: [8/9 regression] CTAD confuses with {one element} initializer_list Product: gcc Version: 8.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: lichray at gmail dot com Target Milestone: --- Created attachment 46213 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=46213&action=edit test case https://godbolt.org/z/f8rKSG #include <type_traits> #include <initializer_list> enum class X {}; struct Term { double a; X i; }; template <class It = const Term *> struct sum { sum(std::initializer_list<Term>) {} }; int main() { auto c2 = sum{{1, X()}, {2, X()}}; auto c1 = sum{{1, X()}}; // fails only this auto c0 = sum{{}}; } <source>:18:25: note: cannot convert '{1, (X)0}' (type '<brace-enclosed initializer list>') to type 'std::initializer_list<Term>' auto c1 = sum{{1, X()}}; -- It's certainly convertible if you add <>. Works in GCC 7, MSVC, Clang.