140cf935cd
Remove ability for reserve(n) to reduce a string's capacity. Add a new reserve() overload that makes a shrink-to-fit request, and make shrink_to_fit() use that. libstdc++-v3/ChangeLog: 2020-07-30 Andrew Luo <andrewluotechnologies@outlook.com> Jonathan Wakely <jwakely@redhat.com> * config/abi/pre/gnu.ver (GLIBCXX_3.4): Use less greedy patterns for basic_string members. (GLIBCXX_3.4.29): Export new basic_string::reserve symbols. * doc/xml/manual/status_cxx2020.xml: Update P0966 status. * include/bits/basic_string.h (shrink_to_fit()): Call reserve(). (reserve(size_type)): Remove default argument. (reserve()): Declare new overload. [!_GLIBCXX_USE_CXX11_ABI] (shrink_to_fit, reserve): Likewise. * include/bits/basic_string.tcc (reserve(size_type)): Remove support for shrinking capacity. (reserve()): Perform shrink-to-fit operation. [!_GLIBCXX_USE_CXX11_ABI] (reserve): Likewise. * testsuite/21_strings/basic_string/capacity/1.cc: Adjust to reflect new behavior. * testsuite/21_strings/basic_string/capacity/char/1.cc: Likewise. * testsuite/21_strings/basic_string/capacity/char/18654.cc: Likewise. * testsuite/21_strings/basic_string/capacity/char/2.cc: Likewise. * testsuite/21_strings/basic_string/capacity/wchar_t/1.cc: Likewise. * testsuite/21_strings/basic_string/capacity/wchar_t/18654.cc: Likewise. * testsuite/21_strings/basic_string/capacity/wchar_t/2.cc: Likewise. |
||
---|---|---|
.. | ||
abi.xml | ||
algorithms.xml | ||
allocator.xml | ||
appendix_contributing.xml | ||
appendix_free.xml | ||
appendix_porting.xml | ||
atomics.xml | ||
auto_ptr.xml | ||
backwards_compatibility.xml | ||
bitmap_allocator.xml | ||
build_hacking.xml | ||
codecvt.xml | ||
concurrency_extensions.xml | ||
concurrency.xml | ||
configure.xml | ||
containers.xml | ||
ctype.xml | ||
debug_mode.xml | ||
debug.xml | ||
diagnostics.xml | ||
documentation_hacking.xml | ||
evolution.xml | ||
extensions.xml | ||
internals.xml | ||
intro.xml | ||
io.xml | ||
iterators.xml | ||
locale.xml | ||
localization.xml | ||
messages.xml | ||
mt_allocator.xml | ||
numerics.xml | ||
parallel_mode.xml | ||
policy_data_structures_biblio.xml | ||
policy_data_structures.xml | ||
prerequisites.xml | ||
shared_ptr.xml | ||
spine.xml | ||
status_cxx1998.xml | ||
status_cxx2011.xml | ||
status_cxx2014.xml | ||
status_cxx2017.xml | ||
status_cxx2020.xml | ||
status_cxxis29124.xml | ||
status_cxxtr1.xml | ||
status_cxxtr24733.xml | ||
strings.xml | ||
support.xml | ||
test_policy_data_structures.xml | ||
test.xml | ||
using_exceptions.xml | ||
using.xml | ||
utilities.xml |