This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/56387] Alias of class template wrongly seen as different
- From: "pkeir at outlook dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 19 Feb 2013 12:20:39 +0000
- Subject: [Bug c++/56387] Alias of class template wrongly seen as different
- Auto-submitted: auto-generated
- References: <bug-56387-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56387
--- Comment #4 from Paul Keir <pkeir at outlook dot com> 2013-02-19 12:20:39 UTC ---
Comment on attachment 29492
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=29492
Another unexpected error; and also an internal compiler error
>template <int ...Is>
>struct is1 {};
>
>template <typename, int, int>
>struct ein_helper;
>
>template <int ...Is, int N>
>struct ein_helper<is1<Is...>,N,N> {
> typedef is1<Is...> type;
>};
>
>template <int ...Is, int N, int Ne>
>struct ein_helper<is1<Is...>,N,Ne> {
> typedef typename ein_helper<is1<Is...,N>,N+1,Ne>::type type;
>};
>
>template <typename T>
>using ein1 = typename ein_helper<is1<>,0,5>::type;
>
>using ein2 = typename ein_helper<is1<>,0,5>::type;
>
>template <template <int ...> class C, int ...Is>
>inline void burst(C<Is...> const &arg_ixs) {}
>
>void test() {
> ein1<int> abc;
>// ein2 abc; // Use instead for an internal compiler error
> burst(abc);
>}