[Bug c++/105045] [modules] Can't deduce defaulted template parameter

cvs-commit at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Oct 18 14:58:49 GMT 2022


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105045

Patrick Palka <ppalka at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |FIXED
   Target Milestone|---                         |13.0
                 CC|                            |ppalka at gcc dot gnu.org

--- Comment #1 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Patrick Palka <ppalka@gcc.gnu.org>:

https://gcc.gnu.org/g:0101137c7c5d612c0624f9a2fd5198b302243f85

commit r13-3362-g0101137c7c5d612c0624f9a2fd5198b302243f85
Author: Patrick Palka <ppalka@redhat.com>
Date:   Tue Oct 18 10:57:30 2022 -0400

    c++ modules: stream non-trailing default targs [PR105045]

    This fixes the below testcase in which we neglect to stream the default
    argument for T only because the subsequent parameter U doesn't also have
    a default argument.

            PR c++/105045

    gcc/cp/ChangeLog:

            * module.cc (trees_out::tpl_parms_fini): Don't assume default
            template arguments must be trailing.
            (trees_in::tpl_parms_fini): Likewise.

    gcc/testsuite/ChangeLog:

            * g++.dg/modules/pr105045_a.C: New test.
            * g++.dg/modules/pr105045_b.C: New test.

--- Comment #2 from Patrick Palka <ppalka at gcc dot gnu.org> ---
Fixed on trunk


More information about the Gcc-bugs mailing list