Landing: e906bebbf21d

Project / Subsystem

gcc / libstdc++

Date

2026-06-30

Author

Anlai Lu

Commit

e906bebbf21dc50a5c4db9afa358db6e48d4706b

Source

github

Perf win

Yes

Breaking

No

All attributes

project
gcc
subsystem
libstdc++
patch_id
commit_hash
e906bebbf21dc50a5c4db9afa358db6e48d4706b
source_type
github
headline
Libstdc++: Use __chrono_write for chrono ostream insertion.
tldr
Libstdc++ chrono output now uses a new helper function for improved formatting and buffer management.
author
Anlai Lu
outcome
committed
performance_win
true
breaking_change
false
series_id
series_parts
[]
tags
  • libstdc++
  • chrono
  • formatting
  • iostream
discussion_id_link
bugzilla_pr
date
2026-06-30T00:00:00.000Z

The C++ standard library’s chrono formatting for operator<< has been refactored to use a new helper function, __detail::__chrono_write. This function formats chrono objects into a stack buffer using std::format_to_n and then writes the output via __ostream_insert. This change consolidates formatting logic, allows per-type buffer tuning via a _BufSize template parameter, and replaces older methods like std::format, std::vformat, and basic_stringstream for chrono output.