[Bug c++/59980] Diagnostics relating to template-specialisations using enums.

redi at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Jan 31 14:29:00 GMT 2014


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59980

--- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Jason from comment #3)
> C-style enums decay to the underlying integer representation, this
> particular behaviour helps complicate considering how any modification to
> the diagnostic might be implemented.

I don't see how the decay is relevant, if the template parameter is of type E
then the compiler's IR stores a value with that type, not an integer, so
there's no decaying.  For the purposes of this diagnostic I don't see any
difference between scoped and unscoped enums.



More information about the Gcc-bugs mailing list