https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71832
--- Comment #7 from Paolo Carlini <paolo.carlini at oracle dot com> --- Skipping completely the body works for this testcase, isn't that difficult to do, but goes too far, the template completely disappears and we end up with bad error recovery for anything referring to it afterwards. Probably, a better approximation would be skipping the *instantiations* of the body.