https://gcc.gnu.org/bugzilla/show_bug.cgi?id=18474
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Note this is only invalid as n (if declared correctly) was not depedent so the operator lookup would be bound at definition time. That is the following needs to be accepted still: template <class T> void g(void) { T n; -n = 0; +n = 0; }