]> git.ipfire.org Git - thirdparty/gcc.git/commit
libstdc++: Check __cpp_exceptions in basic_string::reserve()
authorJonathan Wakely <jwakely@redhat.com>
Mon, 10 Aug 2020 11:02:18 +0000 (12:02 +0100)
committerGiuliano Belinassi <giuliano.belinassi@usp.br>
Mon, 17 Aug 2020 18:07:54 +0000 (15:07 -0300)
commitdcabf1582dfa1b858a827ed4040cce5a6dcd27c9
tree9979bdccf578221e388e5187c765233f48fae56f
parentcee4e70e77efe0c85ee27232223b706d983ad3e2
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