Landing: 7249bc4aacc4

Project / Subsystem

gcc / libstdc++

Date

2026-08-21

Author

Patrick Palka

Commit

7249bc4aacc443faeb054d082d25e5d5cb819df9

Source

github

Perf win

No

Breaking

No

All attributes

project
gcc
subsystem
libstdc++
patch_id
—
commit_hash
7249bc4aacc443faeb054d082d25e5d5cb819df9
source_type
github
headline
libstdc++: Implement LWG 3749 changes to common_iterator
tldr
Updates common_iterator to conform to LWG 3749, ensuring correct iterator category handling.
author
Patrick Palka
outcome
committed
performance_win
false
breaking_change
false
series_id
—
series_parts
[]
tags
  • • libstdc++
  • • iterator
  • • C++
  • • standard library
discussion_id_link
—
bugzilla_pr
—
date
2026-08-21T00:00:00.000Z

This change updates libstdc++‘s common_iterator to align with the C++ standard library’s LWG 3749 resolution. It modifies iterator_traits for common_iterator to correctly determine the iterator category, ensuring compatibility and proper behavior when dealing with different iterator and sentinel types. The changes involve adding a new helper, __detail::__common_iterator_iter_cat, and updating the iterator_traits definition.