| 1 | // RUN: %clang_cc1 -std=c++11 -verify -emit-llvm-only %s |
|---|---|
| 2 | // RUN: %clang_cc1 -std=c++98 -fsyntax-only -verify %s -DCPP98 |
| 3 | |
| 4 | namespace std { |
| 5 | template <class _E> |
| 6 | class initializer_list |
| 7 | {}; |
| 8 | } |
| 9 | |
| 10 | template<class E> int f(std::initializer_list<E> il); |
| 11 | |
| 12 | |
| 13 | int F = f({1, 2, 3}); |
| 14 | #ifdef CPP98 |
| 15 | //expected-error@-2{{expected expression}} |
| 16 | #else |
| 17 | //expected-error@-4{{cannot compile}} |
| 18 | #endif |
| 19 | |
| 20 | |
| 21 |