Summary: | class template argument deduction in non-type template parameter allows explicit deduction guide | ||
---|---|---|---|
Product: | gcc | Reporter: | Barry Revzin <barry.revzin> |
Component: | c++ | Assignee: | Patrick Palka <ppalka> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | ppalka, webrown.cpp |
Priority: | P3 | ||
Version: | 10.0 | ||
Target Milestone: | 11.3 | ||
Host: | Target: | ||
Build: | Known to work: | ||
Known to fail: | Last reconfirmed: | 2021-08-12 00:00:00 |
Description
Barry Revzin
2021-08-12 15:29:25 UTC
The master branch has been updated by Patrick Palka <ppalka@gcc.gnu.org>: https://gcc.gnu.org/g:a6b3db3e8625a3cba1240f0b5e1a29bd6c68b8ca commit r12-2990-ga6b3db3e8625a3cba1240f0b5e1a29bd6c68b8ca Author: Patrick Palka <ppalka@redhat.com> Date: Wed Aug 18 08:37:42 2021 -0400 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. The releases/gcc-11 branch has been updated by Patrick Palka <ppalka@gcc.gnu.org>: https://gcc.gnu.org/g:52dd840c5eba25ef54dee3f1c78f371032a7c051 commit r11-9078-g52dd840c5eba25ef54dee3f1c78f371032a7c051 Author: Patrick Palka <ppalka@redhat.com> Date: Wed Aug 18 08:37:42 2021 -0400 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. (cherry picked from commit a6b3db3e8625a3cba1240f0b5e1a29bd6c68b8ca) Fixed for GCC 11.3 and 12. |