diff options
author | Jason Merrill <jason@redhat.com> | 2012-01-11 11:46:57 -0500 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2012-01-11 11:46:57 -0500 |
commit | 7bb37352bed918f61a537596ea8097eb399b3883 (patch) | |
tree | 529f667258c06d8b12e1b98c6ee083196a1d37c6 /gcc/cp/pt.c | |
parent | 145f71b5ecfaf5efca5689f0fa84b78a7c5c70be (diff) | |
download | gcc-7bb37352bed918f61a537596ea8097eb399b3883.zip gcc-7bb37352bed918f61a537596ea8097eb399b3883.tar.gz gcc-7bb37352bed918f61a537596ea8097eb399b3883.tar.bz2 |
re PR c++/51613 (Ambiguous function template instantiations as template argument are not rejected)
PR c++/51613
* pt.c (resolve_overloaded_unification): Compare types with
same_type_p, not decls_match.
From-SVN: r183099
Diffstat (limited to 'gcc/cp/pt.c')
-rw-r--r-- | gcc/cp/pt.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index bc3dd97..ac72b6d 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -15471,7 +15471,7 @@ resolve_overloaded_unification (tree tparms, elem = tsubst (TREE_TYPE (fn), subargs, tf_none, NULL_TREE); if (try_one_overload (tparms, targs, tempargs, parm, elem, strict, sub_strict, addr_p, explain_p) - && (!goodfn || !decls_match (goodfn, elem))) + && (!goodfn || !same_type_p (goodfn, elem))) { goodfn = elem; ++good; |