This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/52008] [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: Fri, 20 Apr 2012 13:33:35 +0000
- Subject: [Bug c++/52008] [C++0x] ICE when adding partial specialization for variadic-templated structure
- Auto-submitted: auto-generated
- References: <bug-52008-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52008
Michal Malecki <ethouris at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|FIXED |
--- Comment #5 from Michal Malecki <ethouris at gmail dot com> 2012-04-20 13:33:35 UTC ---
Hey, guys, not too fast.
Why do you say "it's not more specialized"?
The primary template contains "size_t B" as the first template parameter, and
the specialization puts explicit "0" in this place. According to the standard,
this IS a specialization.
Of course, it works now if you change the terminal definition into:
template<typename Type1, typename... Types>
struct tuple_sliced<0, Type1, Types...>
{
typedef tuple<Type1, Types...> type;
};
But it's roughly the same - the only difference is that it doesn't manage an
interesting case of slicing to 0 (actually I should change it to 1). Whether
the specialization really matches the primary template, it should be decided
when the variadic parameters are expanded, so if this is correct, the cited one
should be correct, too.