]> git.ipfire.org Git - thirdparty/gcc.git/commit
libstdc++: Move COW string definitions to separate header
authorJonathan Wakely <jwakely@redhat.com>
Mon, 26 Jul 2021 14:08:00 +0000 (15:08 +0100)
committerJonathan Wakely <jwakely@redhat.com>
Tue, 27 Jul 2021 11:04:18 +0000 (12:04 +0100)
commit7b527614ddee5244dfaa1ba35daec596bfb346e9
tree92189a9bf3f716e50d887bb3813bfa0e7616abfd
parent16158c96496b537194111526d25e19f268d613b6
libstdc++: Move COW string definitions to separate header

This moves the definitions of the COW string to a separate file, so that
they don't need to be preprocessed for the common case. We could also
move the SSO string definitions to a new file, so that they don't need
to be preprocessed for the old ABI case, but that would require more
shovel work because there are some parts of <bits/basic_string.h> and
<bits/basic_string.tcc> that are common to both definitions.

libstdc++-v3/ChangeLog:

* include/Makefile.am: Add new header.
* include/Makefile.in: Regenerate.
* include/bits/basic_string.h [!_GLIBCXX_USE_CXX11_ABI]
(basic_string): Move definition of Copy-on-Write string to
new file.
* include/bits/basic_string.tcc: Likewise.
* include/bits/cow_string.h: New file.
libstdc++-v3/include/Makefile.am
libstdc++-v3/include/Makefile.in
libstdc++-v3/include/bits/basic_string.h
libstdc++-v3/include/bits/basic_string.tcc
libstdc++-v3/include/bits/cow_string.h [new file with mode: 0644]