https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61663
--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The trunk branch has been updated by Nathan Sidwell <nat...@gcc.gnu.org>: https://gcc.gnu.org/g:80f075b410125bddb31459428760645baba1a69f commit r14-1689-g80f075b410125bddb31459428760645baba1a69f Author: Nathan Sidwell <nat...@acm.org> Date: Sat Jun 10 12:42:17 2023 -0400 c++: Adjust conversion deduction [PR61663][DR976] Drop the return type's reference before doing cvqual and related decays. gcc/cp/ PR c++/61663 * pt.cc (maybe_adjust_types_for_deduction): Implement DR976. gcc/testsuite/ * g++.dg/template/pr61663.C: New.