Landing: 98847dc641b9
Project / Subsystem
gcc / libstdc++
Date
2026-09-25
Author
Jonathan Wakely
Commit
98847dc641b95a29fe470b90e4fec034daa4300b
Source
github
Perf win
No
Breaking
Yes
All attributes
- project
- gcc
- subsystem
- libstdc++
- patch_id
- —
- commit_hash
- 98847dc641b95a29fe470b90e4fec034daa4300b
- source_type
- github
- headline
- Enable dangling checks in std::pair and std::tuple.
- tldr
- Dangling reference checks are now enabled by default for std::pair and std::tuple.
- author
- Jonathan Wakely
- outcome
- committed
- performance_win
- false
- breaking_change
- true
- series_id
- —
- series_parts
- []
- tags
-
- • libstdc++
- • safety
- • C++20
- discussion_id_link
- —
- bugzilla_pr
- —
- date
- 2026-09-25T00:00:00.000Z
Checks for dangling references in std::pair and std::tuple constructors are now enabled by default, not just in debug mode. This change makes it ill-formed to create pairs or tuples with dangling references, preventing potential undefined behavior. Programs that previously relied on such constructs in unexecuted code paths may need to be updated.