Consider following code:
#include <initializer_list>
struct A
{
int x;
};
int main()
{
std::initializer_list<A>{100};
}
Clang accepts it. GCC and MSVC reject it, with errors like:
error: no matching function for call to 'std::initializer_list<A>::initializer_list(<brace-enclosed initializer list>)'
Which compiler is correct here?
I tried looking at [dcl.init.list]/5 and [over.match.list], but didn't find anything interesting.