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
This commit is contained in:
parent
745b451267
commit
dd809fdeca
@ -1,3 +1,9 @@
|
||||
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,
|
||||
|
6
gcc/testsuite/g++.dg/template/ttp30.C
Normal file
6
gcc/testsuite/g++.dg/template/ttp30.C
Normal file
@ -0,0 +1,6 @@
|
||||
// PR c++/78898
|
||||
|
||||
struct A {
|
||||
template <class T> A(T);
|
||||
template <template <typename> class SmartPtr> A(SmartPtr<int>) { A(0); }
|
||||
};
|
Loading…
x
Reference in New Issue
Block a user