blob: 8c6afe06cac2fb5776ecf88cabad257d04806b7c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
// PR c++/105637
// { dg-do compile { target c++11 } }
struct Base {
void foo(); // #1
void foo() const = delete; // #2
};
template<class T>
struct TopClass : T {
void failsToCompile() {
[this] { Base::foo(); }(); // should select #2, not #1
}
void failsToCompile() const {
[this] { Base::foo(); }(); // { dg-error "deleted" }
}
};
template struct TopClass<Base>;
|