This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/52008] New: [C++0x] ICE when adding partial specialization for variadic-templated structure
- From: "ethouris at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 26 Jan 2012 10:36:46 +0000
- Subject: [Bug c++/52008] New: [C++0x] ICE when adding partial specialization for variadic-templated structure
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52008
Bug #: 52008
Summary: [C++0x] ICE when adding partial specialization for
variadic-templated structure
Classification: Unclassified
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: ethouris@gmail.com
I found this with the following code:
template <size_t B, typename Type1, typename... Types>
struct tuple_sliced
{
typedef typename tuple_sliced<B-1, Types...>::type type;
};
template<typename... Types>
struct tuple_sliced<0, Types...> // <-- line 18
{
typedef tuple<Types...> type;
};
gcc 4.6 says that it's not implemented to expand "Types..." in the first
structure. With gcc 4.7 I got a message:
tuple.cc:18:8: internal compiler error: in process_partial_specialization, at
cp/pt.c:4398
The master declaration of tuple_sliced passes correctly - however any use of it
will result in infinite recursion when there's no terminal version.