This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 118e. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.
2025-11-05
The example in 13.9.4 [temp.expl.spec] paragraph 6 reads, in part,
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
The int enum-base in the last two lines appears to be incorrect; the reference to A<char> in the nested-name-specifier will have instantiated the declarations of E and S with an enum-base of char, and the explicit specializations must agree.
Rationale (February, 2014):
The problem was fixed editorially in N3797.