Landing: 0b3c5e87f6c5
Project / Subsystem
gcc / libstdc++
Date
2026-07-24
Author
Tomasz Kamiński
Commit
0b3c5e87f6c5a93076227883fa2f882a4e879e63
Source
github
Perf win
No
Breaking
No
All attributes
- project
- gcc
- subsystem
- libstdc++
- patch_id
- —
- commit_hash
- 0b3c5e87f6c5a93076227883fa2f882a4e879e63
- source_type
- github
- headline
- libstdc++ correctness fix for layout_stride::mapping uniqueness check
- tldr
- Corrects the uniqueness check for `layout_stride::mapping` in C++20 ranges, resolving LWG4606 and accepting valid mappings.
- author
- Tomasz Kamiński
- outcome
- committed
- performance_win
- false
- breaking_change
- false
- series_id
- —
- series_parts
- []
- tags
-
- • libstdc++
- • c++20
- • ranges
- discussion_id_link
- —
- bugzilla_pr
- —
- date
- 2026-07-24T00:00:00.000Z
GCC’s libstdc++ has corrected the implementation of the uniqueness check for std::ranges::stride::mapping to align with the C++20 standard (LWG4606). The previous implementation incorrectly rejected some valid stride combinations. The fix accurately calculates the required span size for new mappings derived from existing ones, ensuring that the stride of a newly added dimension is sufficiently large. It also handles dimensions with an extent of one and zero strides more correctly.