https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86183
--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> --- The code is valid. It should not give an error, because the definition of the scoped enumeration type should be instantiated by the implicit instantiation of the class template. I changed the status to NEW and set the keyword rejects-valid, I wouldn't have done that if it was invalid.