]> git.ipfire.org Git - thirdparty/gcc.git/commit
Make allocator propagation more consistent for operator+(basic_string) (P1165R1)
authorNina Dinka Ranns <dinka.ranns@gmail.com>
Tue, 7 May 2019 15:30:46 +0000 (15:30 +0000)
committerJonathan Wakely <redi@gcc.gnu.org>
Tue, 7 May 2019 15:30:46 +0000 (16:30 +0100)
commitf4e678ef74b2726f9c07be2b39712a9ea4eb7119
tree5c6609e0b18faeec8b0105b2fcd1bf1ab6efb45a
parent2313938e75f98487eb83d605e0670e2d108c3353
Make allocator propagation more consistent for operator+(basic_string) (P1165R1)

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

Make allocator propagation more consistent for
operator+(basic_string) (P1165R1)
* include/bits/basic_string.h
(operator+(basic_string&&, basic_string&&): Changed resulting
allocator to always be the one from the first parameter.
* include/bits/basic_string.tcc
(operator+(const _CharT*, const basic_string&)): Changed
resulting allocator to be SOCCC on the second parameter's allocator.
(operator+(_CharT, const basic_string&)): Likewise.
* testsuite/21_strings/basic_string/allocator/char/operator_plus.cc:
New.
* testsuite/21_strings/basic_string/allocator/wchar_t/operator_plus.cc:
New.

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