[Bug c++/51203] [C++0x] Recursive alias template specialization causes compiler segfault
dodji at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Nov 25 13:28:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51203
Dodji Seketeli <dodji at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |FIXED
--- Comment #3 from Dodji Seketeli <dodji at gcc dot gnu.org> 2011-11-25 12:59:05 UTC ---
commenting on the below,
template <typename t>
struct foo {
template <int n>
using next = typename foo<t>::next<n + 1>;//#1
template <>
using next<10> = int; // #2 not sure if alias templates can be
specialized
};
I think #1 is invalid because [temp.alias]/3 says:
"The type-id in an alias template declaration shall not refer to the
alias template being declared."
In other words, the name "next" should not appear at the right hand
side of the "=" in the alias template declaration there.
And in #2, there is the additional invalid specialization of the alias
template, already raised by Daniel on comment #2.
Furthermore, I am not getting any ICE anymore on this from trunk of today
at revision r181718.
So I am closing this as fixed for now.
Thank you for filing this.
More information about the Gcc-bugs
mailing list