| // RUN: %clang_cc1 -fsyntax-only -verify %s |
| long &operator[](long); // expected-note{{candidate function}} |
| struct ConvertibleToInt { |
| template<typename T, typename U, typename Result> |
| Result &result = t[u]; // expected-error{{no viable overloaded operator[] for type}} |
| template struct Subscript0<int*, int, int&>; |
| template struct Subscript0<Sub0, int, int&>; |
| template struct Subscript0<Sub1, ConvertibleToInt, long&>; |
| template struct Subscript0<Sub1, Sub0, long&>; // expected-note{{instantiation}} |
| bool operator[](int n) const { return true; } |
| void Foo(const S<int>& s, T x) { |