Created on 2013-10-01.00:00:00 last changed 143 months ago
Rationale (February, 2014):
The problem was fixed editorially in N3797.
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.
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2014-03-03 00:00:00 | admin | set | messages: + msg4983 |
| 2014-03-03 00:00:00 | admin | set | status: open -> nad |
| 2013-10-01 00:00:00 | admin | create | |