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

--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Marek Polacek <mpola...@gcc.gnu.org>:

https://gcc.gnu.org/g:1afa4facb9348cac0349ff9c30066aa25a3608f7

commit r12-1310-g1afa4facb9348cac0349ff9c30066aa25a3608f7
Author: Marek Polacek <pola...@redhat.com>
Date:   Mon Jun 7 16:06:00 2021 -0400

    c++: explicit() ignored on deduction guide [PR100065]

    When we have explicit() with a value-dependent argument, we can't
    evaluate it at parsing time, so cp_parser_function_specifier_opt stashes
    the argument into the decl-specifiers and grokdeclarator then stores it
    into explicit_specifier_map, which is then used when substituting the
    function decl.  grokdeclarator stores it for constructors and conversion
    functions, but we also need to do it for deduction guides, otherwise
    we'll forget that we've seen an explicit-specifier as in the attached
    test.

            PR c++/100065

    gcc/cp/ChangeLog:

            * decl.c (grokdeclarator): Store a value-dependent
            explicit-specifier even for deduction guides.

    gcc/testsuite/ChangeLog:

            * g++.dg/cpp2a/explicit18.C: New test.

Reply via email to