On 13 June 2014 21:33, Jason Merrill <ja...@redhat.com> wrote:
> 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


Yeah, my point was just that unscoped enums (with an explicit underlying type)
as such are eligible for specialization, hence I added tests for that, and also
for unscoped enums with no explicit underlying type, which cannot really
be specialized since you either can't just declare the enum, or alternatively
the members end up being redeclarations.

So, is the last patch ok, or does it need further work?

Reply via email to