libstdc++: Check __cpp_exceptions in basic_string::reserve()
authorJonathan Wakely <jwakely@redhat.com>
Mon, 10 Aug 2020 11:02:18 +0000 (12:02 +0100)
committerJonathan Wakely <jwakely@redhat.com>
Mon, 10 Aug 2020 11:02:18 +0000 (12:02 +0100)
commit8bd92d8097d44be01a2bc7e14f7916d151dffcd6
treeb36dac1d91ab5eab03d6b047fada6c7b88b88439
parent7b7bbbcf510bbc0d95389d157369ade799af4717
libstdc++: Check __cpp_exceptions in basic_string::reserve()

If exceptions are disabled then reallocating could abort, so ignore
shrink-to-fit requests.

libstdc++-v3/ChangeLog:

* include/bits/basic_string.tcc [_GLIBCXX_USE_CXX11_ABI=0]
(basic_string::reserve()): Do nothing if exceptions are not
enabled.
libstdc++-v3/include/bits/basic_string.tcc