On 06/13/2014 02:05 PM, Ville Voutilainen wrote:
that example has ones that have the wrong underlying type.
Good point. That was fixed after the DR was incorporated into the WP,
which now says
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 : char { echar }; // ill-formed, A<char>::E
was instantiated
// when A<char> was instantiated
template<> enum class A<char>::S : char { schar }; // OK
Jason