https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61539

--- Comment #2 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
Another smaller testcase (clang rejects this):

markus@x4 tmp % cat foo.ii
template <class> class A;
template <> class A<char>
{
  virtual void m_fn1 (int &, const int &) const;
};
template <typename, int> class B;
template <class, class = int> class C : A<char>
{
public:
  C (void *) {}
  void m_fn1 (int &, const int &) const;
};
C<B<double, 0> > *a = new C<B<double, 0>>(0);
template <class... T> void validate (B<T...> *);
template <class T, class charT>
void C<T, charT>::m_fn1 (int &, const int &) const
{
  validate ((T *)0);
}

markus@x4 tmp % g++ -c -std=c++11 foo.ii
foo.ii: In substitution of ‘template<class ... T> void validate(B<T ...>*)
[with T = <missing>]’:
foo.ii:18:19:   required from ‘void C< <template-parameter-1-1>,
<template-parameter-1-2> >::m_fn1(int&, const int&) const [with
<template-parameter-1-1> = B<double, 0>; <template-parameter-1-2> = int]’
foo.ii:19:1:   required from here
foo.ii:18:19: internal compiler error: in unify_one_argument, at cp/pt.c:16504

PR60942 looks like a dup.

Reply via email to