https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110801
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> --- (In reply to Jonathan Wakely from comment #1) > Created attachment 55739 [details] > Add special case for format("{}", integer) The _Seq_sink::_M_get_pointer and _Iter_sink::_M_get_pointer overrides in this patch are broken. They assume that no other output has already been done to the sink, but that isn't true if you have a formatter that writes some output then uses format("{}", i) to write some more (e.g. chrono formatters). The format("{}", i) call will use the new fast path and call _M_get_pointer which currently gives a pointer to the start of the buffer, but that overwrites anything already written there. I have a fix for that.