Landing: 197dec13806e

Project / Subsystem

gcc / libstdc++

Date

2026-07-01

Author

Tomasz Kamiński

Commit

197dec13806ec8d9d43089317884734e6c5d1140

Source

github

Perf win

No

Breaking

No

All attributes

project
gcc
subsystem
libstdc++
patch_id
commit_hash
197dec13806ec8d9d43089317884734e6c5d1140
source_type
github
headline
libstdc++: Extract optional<T&> specialization to bits/optional_ref.h.
tldr
Refactors libstdc++ headers to reduce dependencies and resolve cyclic includes.
author
Tomasz Kamiński
outcome
committed
performance_win
false
breaking_change
false
series_id
series_parts
[]
tags
  • libstdc++
  • header
  • dependency
discussion_id_link
bugzilla_pr
date
2026-07-01T00:00:00.000Z

The optional reference specialization and its related components have been moved to a new header, bits/optional_ref.h. This change aims to break cyclic dependencies, particularly for the header when handling exception_ptr_cast. By separating these definitions, the compiler can avoid issues related to header inclusion order. Additionally, inplace tags have been moved to bits/inplace_tags.h, further minimizing dependencies.