PR libstdc++/79254 simplify exception-safety in copy assignment
authorJonathan Wakely <jwakely@redhat.com>
Wed, 1 Feb 2017 11:41:48 +0000 (11:41 +0000)
committerJonathan Wakely <redi@gcc.gnu.org>
Wed, 1 Feb 2017 11:41:48 +0000 (11:41 +0000)
commit11d10beb5762c48de90a004368df2c2863b33d7a
treeaab5154423488af538040a2d8a5b37c2dcb566bb
parenta0deb9925478be3738a87f40902c829d867f8f79
PR libstdc++/79254 simplify exception-safety in copy assignment

PR libstdc++/79254
* config/abi/pre/gnu.ver: Remove recently added symbols.
* include/bits/basic_string.h [_GLIBCXX_USE_CXX11_ABI]
(basic_string::_M_copy_assign): Remove.
(basic_string::operator=(const basic_string&)): Don't dispatch to
_M_copy_assign. If source object is small just deallocate, otherwise
perform new allocation before making any changes.
* include/bits/basic_string.tcc [_GLIBCXX_USE_CXX11_ABI]
(basic_string::_M_copy_assign(const basic_string&, true_type)):
Remove.
* testsuite/21_strings/basic_string/allocator/char/copy_assign.cc:
Test cases where the allocators are equal or the string is small.
* testsuite/21_strings/basic_string/allocator/wchar_t/copy_assign.cc:
Likewise.

From-SVN: r245085
libstdc++-v3/ChangeLog
libstdc++-v3/config/abi/pre/gnu.ver
libstdc++-v3/include/bits/basic_string.h
libstdc++-v3/include/bits/basic_string.tcc
libstdc++-v3/testsuite/21_strings/basic_string/allocator/char/copy_assign.cc
libstdc++-v3/testsuite/21_strings/basic_string/allocator/wchar_t/copy_assign.cc