[Bug c++/92187] [concepts] An abbreviated function template ignores type constraint in some circumstances

cvs-commit at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Sat Apr 18 10:55:53 GMT 2020


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

--- Comment #2 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:e43b28ae7f09c0b7a30ab0dd976db761eeb1b0f9

commit r10-7786-ge43b28ae7f09c0b7a30ab0dd976db761eeb1b0f9
Author: Patrick Palka <ppalka@redhat.com>
Date:   Sat Apr 18 06:22:14 2020 -0400

    c++: Abbreviated function template return type [PR92187]

    When updating an auto return type of an abbreviated function template in
    splice_late_return_type, we should also propagate
PLACEHOLDER_TYPE_CONSTRAINTS
    (and cv-qualifiers) of the original auto node.

    gcc/cp/ChangeLog:

            PR c++/92187
            * pt.c (splice_late_return_type): Propagate cv-qualifiers and
            PLACEHOLDER_TYPE_CONSTRAINTS from the original auto node to the new
one.

    gcc/testsuite/ChangeLog:

            PR c++/92187
            * g++.dg/concepts/abbrev5.C: New test.
            * g++.dg/concepts/abbrev6.C: New test.


More information about the Gcc-bugs mailing list