c++: ignore explicit dguides during NTTP CTAD [PR101883]
authorPatrick Palka <ppalka@redhat.com>
Wed, 18 Aug 2021 12:37:42 +0000 (08:37 -0400)
committerPatrick Palka <ppalka@redhat.com>
Wed, 18 Aug 2021 12:37:42 +0000 (08:37 -0400)
commita6b3db3e8625a3cba1240f0b5e1a29bd6c68b8ca
tree2a1372b13a22a9315890a6cb9d2aabc56f2e9a0c
parent88ef1a14bb4ba2bb9e6742bb5ed29d83b30723d0
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.
gcc/cp/pt.c
gcc/testsuite/g++.dg/cpp2a/nontype-class49.C [new file with mode: 0644]