diff options
author | Geoffrey Keating <geoffk@apple.com> | 2005-06-17 22:13:33 +0000 |
---|---|---|
committer | Geoffrey Keating <geoffk@gcc.gnu.org> | 2005-06-17 22:13:33 +0000 |
commit | fad86f7a9ee8cc7eb9f6d9ea817649de703d7f16 (patch) | |
tree | d27af87945c7239afe065cecf47605bbc659ff87 /gcc/cp | |
parent | 9498a22f75b078e17591bb9fd2dd67c424e793a3 (diff) | |
download | gcc-fad86f7a9ee8cc7eb9f6d9ea817649de703d7f16.zip gcc-fad86f7a9ee8cc7eb9f6d9ea817649de703d7f16.tar.gz gcc-fad86f7a9ee8cc7eb9f6d9ea817649de703d7f16.tar.bz2 |
re PR c++/17413 (local classes as template argument)
2005-06-17 Geoffrey Keating <geoffk@apple.com>
PR c++/17413
* pt.c (type_unification_real): Apply template type deduction even
to procedure parameters that are not dependent on a template
parameter.
Index: testsuite/ChangeLog
2005-06-17 Geoffrey Keating <geoffk@apple.com>
PR c++/17413
* g++.dg/template/local5.C: New.
From-SVN: r101141
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/cp/pt.c | 15 |
2 files changed, 12 insertions, 10 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index af04741..3f795aa 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,10 @@ +2005-06-17 Geoffrey Keating <geoffk@apple.com> + + PR c++/17413 + * pt.c (type_unification_real): Apply template type deduction even + to procedure parameters that are not dependent on a template + parameter. + 2005-06-16 Nathan Sidwell <nathan@codesourcery.com> * rtti.c (get_tinfo_decl): Avoid caching tinfo_descs when it might diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index f130859..e811201 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -9366,17 +9366,12 @@ type_unification_real (tree tparms, else type = arg; - if (strict == DEDUCE_EXACT) - { - if (same_type_p (parm, type)) - continue; - } - else - /* It might work; we shouldn't check now, because we might - get into infinite recursion. Overload resolution will - handle it. */ + if (same_type_p (parm, type)) continue; - + if (strict != DEDUCE_EXACT + && can_convert_arg (parm, type, TYPE_P (arg) ? NULL_TREE : arg)) + continue; + return 1; } |