https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118047
--- Comment #11 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
More reduced. Note that if initializer_list isn't in std, the assert fails
even with clang++ and g++11.
```
// PR c++/118047
typedef decltype(sizeof(char)) size_t;
namespace std {
template <typename T>
struct initializer_list {
const T *_M_array;
size_t _M_len;
constexpr size_t size() const { return _M_len; }
};
}
enum E {
One
};
struct A {
E e = One;
};
struct B {
A as[1] {};
};
struct v
{
constexpr v(const std::initializer_list<B> &a) : size(a.size()){}
int size;
};
constexpr v a{{}};
static_assert(a.size == 1);
```