aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorPatrick Palka <ppalka@redhat.com>2021-08-18 08:37:42 -0400
committerPatrick Palka <ppalka@redhat.com>2021-08-18 08:37:42 -0400
commita6b3db3e8625a3cba1240f0b5e1a29bd6c68b8ca (patch)
tree2a1372b13a22a9315890a6cb9d2aabc56f2e9a0c /gcc/cp
parent88ef1a14bb4ba2bb9e6742bb5ed29d83b30723d0 (diff)
downloadgcc-a6b3db3e8625a3cba1240f0b5e1a29bd6c68b8ca.zip
gcc-a6b3db3e8625a3cba1240f0b5e1a29bd6c68b8ca.tar.gz
gcc-a6b3db3e8625a3cba1240f0b5e1a29bd6c68b8ca.tar.bz2
c++: ignore explicit dguides during NTTP CTAD [PR101883]
Since (template) argument passing is a copy-initialization context, we mustn't consider explicit deduction guides when deducing a CTAD placeholder type of an NTTP. PR c++/101883 gcc/cp/ChangeLog: * pt.c (convert_template_argument): Pass LOOKUP_IMPLICIT to do_auto_deduction. gcc/testsuite/ChangeLog: * g++.dg/cpp2a/nontype-class49.C: New test.
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/pt.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index 484723b..0c14966 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -8486,7 +8486,8 @@ convert_template_argument (tree parm,
can happen in the context of -fnew-ttp-matching. */;
else if (tree a = type_uses_auto (t))
{
- t = do_auto_deduction (t, arg, a, complain, adc_unify, args);
+ t = do_auto_deduction (t, arg, a, complain, adc_unify, args,
+ LOOKUP_IMPLICIT);
if (t == error_mark_node)
return error_mark_node;
}