Commit dd809fde by Jason Merrill Committed by Jason Merrill

PR c++/78898 - ICE on constructor with TTP

	PR c++/42329
	* pt.c (unify): Don't look for a class template from a non-class.

From-SVN: r243890
parent 745b4512
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
......
......@@ -20292,7 +20292,8 @@ unify (tree tparms, tree targs, tree parm, tree arg, int strict,
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,
......
// PR c++/78898
struct A {
template <class T> A(T);
template <template <typename> class SmartPtr> A(SmartPtr<int>) { A(0); }
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment