]> git.ipfire.org Git - thirdparty/gcc.git/commit
libstdc++: Tweaks for std::format fast path
authorJonathan Wakely <jwakely@redhat.com>
Thu, 14 Dec 2023 12:57:53 +0000 (12:57 +0000)
committerJonathan Wakely <jwakely@redhat.com>
Thu, 14 Dec 2023 22:04:43 +0000 (22:04 +0000)
commit3fa0f9404b1bcd5a47629d4e121390603039f951
tree7bf8d78ceadfad1f295c6b0e4df7f21767e5c5e1
parent0c773209fc9d0b5fa04f4055bdc2ff9746a1999d
libstdc++: Tweaks for std::format fast path

Fix an incorrect call to _Sink::_M_reserve() which should have passed
the __n parameter. This was not actually a problem because it was in an
discarded statement, because only the _Seq_sink<basic_string<C>>
specialization was used.

Also add some branch prediction hints, explanatory comments, and debug
mode assertions to _Seq_sink.

libstdc++-v3/ChangeLog:

* include/std/format (_Seq_sink): Fix missing argument in
discarded statement. Add comments, likely/unlikely attributes
and debug assertions as sanity checks.
libstdc++-v3/include/std/format