Skip to content
Snippets Groups Projects
Commit 3f4caf5e authored by Jonathan Wakely's avatar Jonathan Wakely
Browse files

libstdc++: Replace global std::string objects in tzdb.cc

When the library is built with --disable-libstdcxx-dual-abi the only
type of std::string supported is the COW string, and the two global
std::string objects in tzdb.cc have to allocate memory. I added them
thinking they would fit in the SSO string buffer, but that's not the
case when the library only uses COW strings.

Replace them with string_view objects to avoid any allocations.

libstdc++-v3/ChangeLog:

	* src/c++20/tzdb.cc (tzdata_file, leaps_file): Change type to
	std::string_view.

(cherry picked from commit d82a85b6)
parent bf5f8808
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment