[C++ PATCH, RFC] PR c++/61491

Jason Merrill jason@redhat.com
Fri Jun 13 16:56:00 GMT 2014


This needs a test that we complain about a specialization of an unscoped 
enum.  Perhaps just the test from 14.7p6??

   template<class T> struct A {
     enum E: T;
     enum class S: T;
   };
   template<> enum A<int>::E: int { eint };         // OK
   template<> enum class A<int>::S: int { sint };   // OK
   template<class T> enum A<T>::E: T { eT };
   template<class T> enum class A<T>::S: T { sT };
   template<> enum A<char>::E: int { echar };       // ill-formed, 
A<char>::E was instantiated when A<char> was instantiated
   template<> enum class A<char>::S: int { schar }; // OK



More information about the Gcc-patches mailing list