This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]