LWG2788 basic_string spurious use of a default constructible allocator
authorNina Dinka Ranns <dinka.ranns@gmail.com>
Thu, 30 May 2019 19:48:48 +0000 (19:48 +0000)
committerJonathan Wakely <redi@gcc.gnu.org>
Thu, 30 May 2019 19:48:48 +0000 (20:48 +0100)
commit046af809f31e24d378a78820619cb0788afd62f9
treec88ec42e02542b860de151cb357fe16d33466a2b
parent608f8e107d7953c5f1302c54e6301964f7168c97
LWG2788 basic_string spurious use of a default constructible allocator

This only change the cxx11 basic_string, because COW strings don't
correctly propagate allocators anyway.

2019-05-30  Nina Dinka Ranns  <dinka.ranns@gmail.com>

LWG2788 basic_string spurious use of a default constructible allocator
* include/bits/basic_string.tcc [_GLIBCXX_USE_CXX11_ABI]
(basic_string::_M_replace_dispatch): Construct temporary string with
the current allocator.
* testsuite/21_strings/basic_string/allocator/char/lwg2788.cc: New.
* testsuite/21_strings/basic_string/allocator/wchar_t/lwg2788.cc: New.

From-SVN: r271789
libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/basic_string.tcc
libstdc++-v3/testsuite/21_strings/basic_string/allocator/char/lwg2788.cc [new file with mode: 0644]
libstdc++-v3/testsuite/21_strings/basic_string/allocator/wchar_t/lwg2788.cc [new file with mode: 0644]