blob: 6d28fb2ec9e0dc8fb8ee74e00880b12209c4ba65 [file] [log] [blame]
// PR c++/89831
struct Q {
int operator[](int i) { return 0; }
int operator[](int i) const { return 0; }
};
struct Base {
Q x;
};
struct X : public Base {
template <typename T>
void f(T) const {
int q = Base::x[0];
}
};
int main() { X().f(3); }