aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@codesourcery.com>2003-03-24 19:47:17 +0000
committerNathan Sidwell <nathan@gcc.gnu.org>2003-03-24 19:47:17 +0000
commit1c82cc908167526cae555db74532db40f889fe1d (patch)
treeabfff919753525ab8774866744a608e236770f6d /gcc/cp
parenta5fcc8951b1107c6fd32b670e0e9919e53349bcf (diff)
downloadgcc-1c82cc908167526cae555db74532db40f889fe1d.zip
gcc-1c82cc908167526cae555db74532db40f889fe1d.tar.gz
gcc-1c82cc908167526cae555db74532db40f889fe1d.tar.bz2
PR c++/9898, PR c++/383, DR 322
cp: PR c++/9898, PR c++/383, DR 322 * pt.c (maybe_adjust_types_for_deduction) [DEDUCE_CONV]: Look through reference types on both PARM and ARG. testsuite: PR c++/9898, c++/383 * g++.dg/template/conv6.C: New test. From-SVN: r64815
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog6
-rw-r--r--gcc/cp/pt.c6
2 files changed, 12 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 8cc2988..b2d4f79 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,4 +1,10 @@
2003-03-24 Nathan Sidwell <nathan@codesourcery.com>
+
+ PR c++/9898, PR c++/383, DR 322
+ * pt.c (maybe_adjust_types_for_deduction) [DEDUCE_CONV]: Look
+ through reference types on both PARM and ARG.
+
+2003-03-24 Nathan Sidwell <nathan@codesourcery.com>
PR c++/10119
* error.c (dump_expr) [BASELINK]: Use dump_expr.
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index aa9a2c7..3557f9f 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -8753,6 +8753,12 @@ maybe_adjust_types_for_deduction (strict, parm, arg)
*parm = TREE_TYPE (*parm);
result |= UNIFY_ALLOW_OUTER_MORE_CV_QUAL;
}
+
+ /* DR 322. For conversion deduction, remove a reference type on parm
+ too (which has been swapped into ARG). */
+ if (strict == DEDUCE_CONV && TREE_CODE (*arg) == REFERENCE_TYPE)
+ *arg = TREE_TYPE (*arg);
+
return result;
}