Landing: 35d754588329
Project / Subsystem
gcc / libstdc++
Date
2026-04-17
Author
Patrick Palka
Commit
35d754588329660ea297bca621747840bffbc7e5
Source
github
Impact
5/10
Perf win
No
Breaking
No
All attributes
- project
- gcc
- subsystem
- libstdc++
- patch_id
- —
- commit_hash
- 35d754588329660ea297bca621747840bffbc7e5
- source_type
- github
- headline
- libstdc++: Fix constraint recursion in std::indirect's operator==.
- tldr
- This patch avoids constraint recursion in `std::indirect`'s `operator==` by using a dependent function parameter.
- why_it_matters
- Constraint recursion can cause compilation errors or unexpected behavior when using `std::indirect` in C++20 and later.
- author
- Patrick Palka
- impact_score
- 5
- impact_rationale
- Fixes a compilation issue related to constraint recursion in a standard library component.
- outcome
- committed
- performance_win
- false
- breaking_change
- false
- series_id
- —
- series_parts
- []
- tags
-
- • libstdc++
- • C++
- • templates
- • bugfix
- discussion_id_link
- —
- bugzilla_pr
- —
- date
- 2026-04-17T00:00:00.000Z
The operator== for std::indirect was susceptible to constraint recursion due to the way the Mandates were implemented as an associated constraint. The fix replaces the non-dependent std::indirect function parameter with a dependent one, similar to the fix applied to std::expected and std::basic_const_iterator. A new test case has also been added.