https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68604
--- Comment #3 from Jason Merrill <jason at gcc dot gnu.org> --- Hmm. The problem here is that the operand of typeid may or may not be an unevaluated operand, so we don't know which it is while we're parsing. This can be worked around by writing typeid(decltype((A::i))) instead, to force the unevaluated operand.