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