On 15 June 2014 16:37, Jason Merrill wrote:
> Yes, but if there is a template definition for the enum available when the
> specialization is declared, the enum template is implicitly instantiated
> along with its containing class, so the specialization is ill-formed because
> you can't define a sp
On 06/13/2014 02:45 PM, Ville Voutilainen wrote:
Yeah, my point was just that unscoped enums (with an explicit underlying type)
as such are eligible for specialization
Yes, but if there is a template definition for the enum available when
the specialization is declared, the enum template is im
On 13 June 2014 21:33, Jason Merrill 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 struct A {
> enum E : T;
> enu
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 struct A {
enum E : T;
enum class S : T;
};
template<> enum A::E : int { eint }; // OK
tem
On 13 June 2014 19:56, Jason Merrill wrote:
> This needs a test that we complain about a specialization of an unscoped
> enum. Perhaps just the test from 14.7p6??
Well, a specialization of an unscoped enum with the proper underlying type
is fine, and that example has ones that have the wrong un
This needs a test that we complain about a specialization of an unscoped
enum. Perhaps just the test from 14.7p6??
template struct A {
enum E: T;
enum class S: T;
};
template<> enum A::E: int { eint }; // OK
template<> enum class A::S: int { sint }; // OK
template en
On 13 June 2014 01:37, Ville Voutilainen wrote:
> DR1206 allows explicit specializations of member enumerations
> of class templates, so just remove the pedwarn about it.
>
> Tested on Linux-x64. Not bootstrapped.
Argh, also remove the old comment, new patch attached.
diff --git a/gcc/cp/pt.c b/g
DR1206 allows explicit specializations of member enumerations
of class templates, so just remove the pedwarn about it.
Tested on Linux-x64. Not bootstrapped.
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index d267a5c..97eadeb 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -967,11 +967,8 @@ maybe_process_