17 lines · cpp
1// RUN: %clang_cc1 -verify %s2 3struct A {4 int x;5};6 7void operator&(A, A);8 9template<typename T>10struct B {11 int f() {12 return T::x & 1; // expected-error {{invalid use of non-static data member 'x'}}13 }14};15 16template struct B<A>; // expected-note {{in instantiation of}}17