2014-06-03 16:26:00 +08:00
|
|
|
// RUN: %clang_cc1 -std=c++98 %s -verify -fexceptions -fcxx-exceptions -pedantic-errors
|
|
|
|
// RUN: %clang_cc1 -std=c++11 %s -verify -fexceptions -fcxx-exceptions -pedantic-errors
|
2014-09-29 05:56:04 +08:00
|
|
|
// RUN: %clang_cc1 -std=c++14 %s -verify -fexceptions -fcxx-exceptions -pedantic-errors
|
|
|
|
// RUN: %clang_cc1 -std=c++1z %s -verify -fexceptions -fcxx-exceptions -pedantic-errors
|
2014-06-03 16:26:00 +08:00
|
|
|
|
|
|
|
// expected-no-diagnostics
|
|
|
|
|
|
|
|
namespace std {
|
|
|
|
__extension__ typedef __SIZE_TYPE__ size_t;
|
|
|
|
|
|
|
|
template<typename T> struct initializer_list {
|
|
|
|
const T *p; size_t n;
|
|
|
|
initializer_list(const T *p, size_t n);
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
namespace dr1070 { // dr1070: 3.5
|
|
|
|
#if __cplusplus >= 201103L
|
|
|
|
struct A {
|
|
|
|
A(std::initializer_list<int>);
|
|
|
|
};
|
|
|
|
struct B {
|
|
|
|
int i;
|
|
|
|
A a;
|
|
|
|
};
|
|
|
|
B b = {1};
|
|
|
|
struct C {
|
|
|
|
std::initializer_list<int> a;
|
|
|
|
B b;
|
|
|
|
std::initializer_list<double> c;
|
|
|
|
};
|
|
|
|
C c = {};
|
|
|
|
#endif
|
|
|
|
}
|