19 lines · cpp
1// RUN: %clang_cc1 %s -verify -std=c++202 3namespace std {4 5template<class T, class = T::x> // expected-error 2 {{type 'int' cannot be used prior to '::' because it has no members}}6class initializer_list;7 8}9 10namespace gh132256 {11 12auto x = {1}; // expected-note {{in instantiation of default argument for 'initializer_list<int>' required here}}13 14void f() {15 for(int x : {1, 2}); // expected-note {{in instantiation of default argument for 'initializer_list<int>' required here}}16}17 18}19