https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112632
--- Comment #10 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The trunk branch has been updated by Jason Merrill <[email protected]>: https://gcc.gnu.org/g:d02c3ca9541aa2ab6ae0e7d9a21603446e561951 commit r17-3708-gd02c3ca9541aa2ab6ae0e7d9a21603446e561951 Author: Jason Merrill <[email protected]> Date: Wed Aug 26 08:39:17 2026 -0700 c++: alias template conversions again [PR126828] The problem here was that we were building an IMPLICIT_CONV_EXPR around a capture proxy, so that when we try to substitute that into the alias template we are no longer within the lambda scope and fall over. convert_nontype_argument properly calls mark_rvalue_use, which resolves the use of the capture to its constant value. So instead of only adding an IMPLICIT_CONV_EXPR wrapper, in this situation let's do the normal conversion and then rewrite a NOP_EXPR/CONVERT_EXPR in the result to IMPLICIT_CONV_EXPR. PR c++/126828 PR c++/112632 gcc/cp/ChangeLog: * pt.cc (dependent_implicit_conv_p): Remove. (convert_nontype_argument_maybe_dependent): Rewrite simple conversion when force_conv. (tsubst_expr): Use it. gcc/testsuite/ChangeLog: * g++.dg/cpp0x/alias-decl-nontype2.C: New test.
