[Bug c++/57919] New: [C++11] Alias templates cause partial specialization to erroneously fail
cheesear at gmail dot com
gcc-bugzilla@gcc.gnu.org
Wed Jul 17 13:19:00 GMT 2013
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57919
Bug ID: 57919
Summary: [C++11] Alias templates cause partial specialization
to erroneously fail
Product: gcc
Version: 4.8.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: cheesear at gmail dot com
Created attachment 30516
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30516&action=edit
MWE that causes the aforementioned error.
The use of alias templates can cause the compiler to think that a valid
template class instantiation is ambiguous. The file attached contains an
example that, when compiled with g++ (version 4.8.1_1 from Macports), results
in the following error:
$ g++ -std=c++11 er.cpp
er.cpp: In function 'int main()':
er.cpp:39:41: error: ambiguous class template instantiation for 'struct foo<1,
1, sequence<> >'
using t = typename foo<1, 1, extents<>>::type;
^
er.cpp:26:8: error: candidates are: struct foo<A, B, sequence<integer<Ts>...> >
struct foo<A, B, extents<Ts...>>
^
er.cpp:32:8: error: struct foo<B, B, sequence<integer<Ts>...> >
struct foo<B, B, extents<Ts...>>
^
er.cpp:39:43: error: 'type' in 'struct foo<1, 1, sequence<> >' does not name a
type
using t = typename foo<1, 1, extents<>>::type;
^
More information about the Gcc-bugs
mailing list