https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109876
--- Comment #7 from Marek Polacek <mpolacek at gcc dot gnu.org> --- // PR c++/109876 using size_t = decltype(sizeof 0); namespace std { template <class> struct initializer_list { const int *_M_array; size_t _M_len; constexpr size_t size() const { return _M_len; } }; } // namespace std template <int> struct Array {}; template <int> void g() { static constexpr std::initializer_list<int> num{2}; Array<num.size()> ctx; }