comparison gcc/testsuite/g++.dg/template/scope6.C @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents
children
comparison
equal deleted inserted replaced
131:84e7813d76e9 145:1830386684a0
1 // PR c++/89831
2
3 struct Q {
4 int operator[](int i) { return 0; }
5 int operator[](int i) const { return 0; }
6 };
7
8 struct Base {
9 Q x;
10 };
11 struct X : public Base {
12 template <typename T>
13 void f(T) const {
14 int q = Base::x[0];
15 }
16 };
17 int main() { X().f(3); }