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