Mercurial > hg > CbC > CbC_llvm
comparison clang/test/SemaTemplate/cxx1z-using-declaration.cpp @ 207:2e18cbf3894f
LLVM12
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 08 Jun 2021 06:07:14 +0900 |
parents | 1d019706d866 |
children | 1f2b6ac9f198 |
comparison
equal
deleted
inserted
replaced
173:0572611fdcc8 | 207:2e18cbf3894f |
---|---|
2 | 2 |
3 // Test that we cope with failure to expand a pack. | 3 // Test that we cope with failure to expand a pack. |
4 template<typename ...T> struct Unexpanded : T... { | 4 template<typename ...T> struct Unexpanded : T... { |
5 using T::f; // expected-error {{unexpanded}} | 5 using T::f; // expected-error {{unexpanded}} |
6 using typename T::type; // expected-error {{unexpanded}} | 6 using typename T::type; // expected-error {{unexpanded}} |
7 template<typename ...U> void g(U ...u) { f(u...); } // expected-error {{undeclared identifier 'f'}} | 7 template<typename ...U> void g(U ...u) { f(u...); } // expected-error {{explicit qualification required to use member 'f' from dependent base class}} |
8 void h() { | 8 void h() { |
9 Unexpanded<type...> *p; // expected-error {{undeclared identifier 'type'}} | 9 Unexpanded<type...> *p; // expected-error {{undeclared identifier 'type'}} |
10 } | 10 } |
11 }; | 11 }; |
12 void test_Unexpanded() { | 12 void test_Unexpanded() { |
13 struct A { void f(); }; // expected-note {{must qualify}} | 13 struct A { void f(); }; |
14 struct B { void f(int); }; // expected-note {{must qualify}} | 14 struct B { void f(int); }; // expected-note {{here}} |
15 Unexpanded<A, B>().g(0); // expected-note {{instantiation of}} | 15 Unexpanded<A, B>().g(0); // expected-note {{instantiation of}} |
16 } | 16 } |
17 | 17 |
18 // Test using non-type members from pack of base classes. | 18 // Test using non-type members from pack of base classes. |
19 template<typename ...T> struct A : T... { | 19 template<typename ...T> struct A : T... { |