diff options
author | Patrick Palka <ppalka@redhat.com> | 2025-08-19 11:07:14 -0400 |
---|---|---|
committer | Patrick Palka <ppalka@redhat.com> | 2025-08-19 11:07:14 -0400 |
commit | 0ab1e31807a19d699c462937ca639718360eac0c (patch) | |
tree | d6d6a51ac26bf5d2ac8bca8f193e6067fa2b56dd /libjava/gnu/java | |
parent | f647d4f58a968079c342a0a3f7e71444d3836614 (diff) | |
download | gcc-0ab1e31807a19d699c462937ca639718360eac0c.zip gcc-0ab1e31807a19d699c462937ca639718360eac0c.tar.gz gcc-0ab1e31807a19d699c462937ca639718360eac0c.tar.bz2 |
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 <jason@redhat.com>
Diffstat (limited to 'libjava/gnu/java')
0 files changed, 0 insertions, 0 deletions