llvm-for-llvmta/tools/clang/test/CXX/temp/temp.names/p3-0x.cpp

13 lines
351 B
C++
Raw Normal View History

2022-04-25 13:02:35 +02:00
// RUN: %clang_cc1 -std=c++11 %s -verify
template<int i> class X { /* ... */ };
X< 1>2 > x1; // expected-error{{expected unqualified-id}}
X<(1>2)> x2; // OK
template<class T> class Y { /* ... */ };
Y<X<1>> x3; // OK, same as Y<X<1> > x3;
Y<X<6>>1>> x4; // expected-error{{expected unqualified-id}}
Y<X<(6>>1)>> x5;
int a, b;
Y<decltype(a < b)> x6;