https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119661
--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> --- https://eel.is/c++draft/expr.ref#5.sentence-2 says though "The class type shall be complete unless the class member access appears in the definition of that class." Isn't that the case here?