clang/test/CXX/expr/expr.prim/expr.prim.id/expr.prim.id.general/p4.cpp
raw| 1 | // RUN: %clang_cc1 -verify %s |
| 2 | |
| 3 | struct A { |
| 4 | int x; |
| 5 | }; |
| 6 | |
| 7 | void operator&(A, A); |
| 8 | |
| 9 | template<typename T> |
| 10 | struct B { |
| 11 | int f() { |
| 12 | return T::x & 1; // expected-error {{invalid use of non-static data member 'x'}} |
| 13 | } |
| 14 | }; |
| 15 | |
| 16 | template struct B<A>; // expected-note {{in instantiation of}} |