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: unassig...@gcc.gnu.org
        ReportedBy: ethou...@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.

Reply via email to