On 07/05/19 12:22 +0100, Jonathan Wakely wrote: >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! I realised that for !_GLIBCXX_USE_CXX11_ABI we can always use the optimization, because we don't support stateful allocators for the old std::string ABI. So I adjusted the patch slightly for that. I've attached what I'll commit. Tested powerpc64le-linux (old and new ABI), committing to trunk.