template struct A { int foo (); int c; }; template int A::foo () { int j; #pragma omp atomic read j = A::c; return j; }