1 // RUN: %clang_cc1 -std=c++98 %s -verify -fexceptions -fcxx-exceptions -pedantic-errors 2 // RUN: %clang_cc1 -std=c++11 %s -verify -fexceptions -fcxx-exceptions -pedantic-errors 3 // RUN: %clang_cc1 -std=c++1y %s -verify -fexceptions -fcxx-exceptions -pedantic-errors 4 5 // expected-no-diagnostics 6 7 namespace std { 8 __extension__ typedef __SIZE_TYPE__ size_t; 9 10 template<typename T> struct initializer_list { 11 const T *p; size_t n; 12 initializer_list(const T *p, size_t n); 13 }; 14 } 15 16 namespace dr1070 { // dr1070: 3.5 17 #if __cplusplus >= 201103L 18 struct A { 19 A(std::initializer_list<int>); 20 }; 21 struct B { 22 int i; 23 A a; 24 }; 25 B b = {1}; 26 struct C { 27 std::initializer_list<int> a; 28 B b; 29 std::initializer_list<double> c; 30 }; 31 C c = {}; 32 #endif 33 } 34