[Bug c++/51203] [C++0x] Recursive alias template specialization causes compiler segfault

daniel.kruegler at googlemail dot com gcc-bugzilla@gcc.gnu.org
Fri Nov 18 19:17:00 GMT 2011


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

Daniel Krügler <daniel.kruegler at googlemail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |daniel.kruegler at
                   |                            |googlemail dot com

--- Comment #2 from Daniel Krügler <daniel.kruegler at googlemail dot com> 2011-11-18 19:03:14 UTC ---
(In reply to comment #1)
> template <typename t>
> struct foo {
>   template <int n>
>   using next = typename foo<t>::next<n + 1>;
>   template <>
>   using next<10> = int; // not sure if alias templates can be specialized
> };

Alias templates cannot be specialized, this is by design.



More information about the Gcc-bugs mailing list