https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124706
--- Comment #2 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The trunk branch has been updated by Marek Polacek <[email protected]>: https://gcc.gnu.org/g:a2dab8f1d8ba2934e780f57c88bb6a513313e93f commit r16-8765-ga2dab8f1d8ba2934e780f57c88bb6a513313e93f Author: Marek Polacek <[email protected]> Date: Fri Apr 17 12:45:53 2026 -0400 c++/reflection: support splices with CTAD [PR124706] This PR points out that we don't handle a splice-type-spec that designates a deducible template, which then serves as a placeholder for CTAD. This is allowed by [dcl.type.simple]/3. This patch fixes that problem by calling make_template_placeholder if we get a deducible template. PR c++/124706 gcc/cp/ChangeLog: * parser.cc (cp_parser_splice_type_specifier): For ctad_template_p call make_template_placeholder. * pt.cc (tsubst_splice_scope): Likewise. gcc/testsuite/ChangeLog: * g++.dg/reflect/error10.C: Adjust dg-error. * g++.dg/reflect/type9.C: Likewise. * g++.dg/reflect/ctad1.C: New test. * g++.dg/reflect/ctad2.C: New test. Reviewed-by: Jason Merrill <[email protected]>
