Debian Codegraph @

gcc/testsuite/g++.dg/template/non-dependent23.C

raw
1 // PR c++/105637
2
3 struct Base {
4 void foo(); // #1
5 void foo() const; // #2
6 void foo() volatile; // #3
7 void foo() const volatile; // #4
8 };
9
10 template<class T>
11 struct TopClass : T {
12 void failsToCompile() const {
13 Base::foo(); // should select #2, not #1
14 }
15
16 void failsToCompile() volatile {
17 Base::foo(); // should select #3, not #1
18 }
19
20 void failsToCompile() const volatile {
21 Base::foo(); // should select #4, not #1
22 }
23 };
24
25 template struct TopClass<Base>;