https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100198
--- Comment #4 from Jason Merrill <jason at gcc dot gnu.org> --- Nested classes/enums like this are broken in pack expansions if they depend on parameter packs. The patch for PR100109 changed this from rejects-valid to ice-on-valid, but it isn't something newly broken. I suppose I could change it back to rejects-valid by reverting the PR100109 patch, but that's just trading one ICE for another. This functionality isn't going to be implemented for GCC 12.