diff options
author | François Dumont <fdumont@gcc.gnu.org> | 2023-01-04 19:34:21 +0100 |
---|---|---|
committer | François Dumont <fdumont@gcc.gnu.org> | 2023-02-04 14:03:54 +0100 |
commit | 540a22d243966d1b882db26b17fe674467e2a169 (patch) | |
tree | 3d5616980078acbf6d95ed2f778b91d566d6bb87 /gcc | |
parent | 49e52115b09b477382fef6f04fd7b4d1641f902c (diff) | |
download | gcc-540a22d243966d1b882db26b17fe674467e2a169.zip gcc-540a22d243966d1b882db26b17fe674467e2a169.tar.gz gcc-540a22d243966d1b882db26b17fe674467e2a169.tar.bz2 |
libstdc++: Optimize basic_string move assignment
Since resolution of Issue 2593 [1] we can consider that equal allocators
before the propagate-on-move-assignment operations will still be equal
afterward.
So we can extend the optimization of transfering the storage of the move-to
instance to the move-from one that is currently limited to always equal
allocators.
[1] https://cplusplus.github.io/LWG/issue2593
libstdc++-v3/ChangeLog:
* include/bits/basic_string.h (operator=(basic_string&&)): Transfer move-to
storage to the move-from instance when allocators are equal.
* testsuite/21_strings/basic_string/allocator/char/move_assign.cc (test04):
New test case.
Diffstat (limited to 'gcc')
0 files changed, 0 insertions, 0 deletions