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

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

https://gcc.gnu.org/g:0ab1e31807a19d699c462937ca639718360eac0c

commit r16-3285-g0ab1e31807a19d699c462937ca639718360eac0c
Author: Patrick Palka <ppa...@redhat.com>
Date:   Tue Aug 19 11:07:14 2025 -0400

    c++: constrained corresponding using from partial spec [PR121351]

    When comparing constraints during correspondence checking for a using
    from a partial specialization, we need to substitute the partial
    specialization arguments into the constraints rather than the primary
    template arguments.  Otherwise we incorrectly reject e.g. the below
    testcase as ambiguous since we substitute T=int* instead of T=int
    into #1's constraints and don't notice the correspondence.

    This patch corrects the recent r16-2771-gb9f1cc4e119da9 fix by using
    outer_template_args instead of TI_ARGS of the DECL_CONTEXT, which
    should always give the correct outer arguments for substitution.

            PR c++/121351

    gcc/cp/ChangeLog:

            * class.cc (add_method): Use outer_template_args when
            substituting outer template arguments into constraints.

    gcc/testsuite/ChangeLog:

            * g++.dg/cpp2a/concepts-using7.C: New test.

    Reviewed-by: Jason Merrill <ja...@redhat.com>

Reply via email to