PR c++/42329
* pt.c (unify): Don't look for a class template from a non-class.
From-SVN: r243890
+2016-12-22 Jason Merrill <jason@redhat.com>
+
+ PR c++/78898
+ PR c++/42329
+ * pt.c (unify): Don't look for a class template from a non-class.
+
2016-12-21 Jakub Jelinek <jakub@redhat.com>
PR c++/72707
if (TREE_CODE (parm) == BOUND_TEMPLATE_TEMPLATE_PARM)
{
- if (strict_in & UNIFY_ALLOW_DERIVED)
+ if ((strict_in & UNIFY_ALLOW_DERIVED)
+ && CLASS_TYPE_P (arg))
{
/* First try to match ARG directly. */
tree t = try_class_unification (tparms, targs, parm, arg,
--- /dev/null
+// PR c++/78898
+
+struct A {
+ template <class T> A(T);
+ template <template <typename> class SmartPtr> A(SmartPtr<int>) { A(0); }
+};