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

Jonathan Wakely jwakely@redhat.com
Tue May 7 11:22:00 GMT 2019


On 07/05/19 12:01 +0100, Nina Dinka Ranns wrote:
>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.

Yes, that's overkill, we provide is_always_equal unconditionally from
C++11 onwards (to avoid ODR violations in code using different -std
options). Since it's defined fo C++11 we can use it for C++11.

I can remove that #if and test and commit the result for you though,
no need for another revision of the patch.

>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.

Yes, that looks fine. Thanks!



More information about the Libstdc++ mailing list