[v3 PATCH] Make stateful allocator propagation more consistent for operator+(basic_string) (P1165R1)

Nina Dinka Ranns dinka.ranns@gmail.com
Tue May 7 11:02:00 GMT 2019


Ack. I've put the use of _Alloc_traits::is_always_equal within #if
__cplusplus >= 201703L block since it is officially a C++17 feature.
Let me know if you think that's an overkill.
New changelog below. I didn't change the description of
operator+(basic_string&&,basic_string&&) as it's still technically
always resulting in an allocator from the first parameter.


2019-05-01  Nina Dinka Ranns  <dinka.ranns@gmail.com>
        Make stateful allocator propagation more consistent
foroperator+(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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: p1165r1_v2.diff
Type: text/x-patch
Size: 12981 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20190507/0dee4e0e/attachment.bin>


More information about the Libstdc++ mailing list