Currently the following case fails:
template<typename Ty> Ty foo(Ty *addr, Ty val) { Ty v; #pragma omp atomic compare capture { v = *addr; if (*addr > val) *addr = val; } return v; }
The compiler complains addr is not a lvalue. That's because when an expression
is instantiation dependent, we cannot tell if it is lvalue or not.