gcc/libstdc++-v3/include
Jonathan Wakely ca243ada71 libstdc++: Fix std::char_traits<C>::move for constexpr
The constexpr branch in __gnu_cxx::char_traits::move compares the string
arguments to see if they overlap, but relational comparisons between
unrelated pointers are not core constant expressions.

I want to replace the comparisons with a loop using pointer equality to
determine whether the end of the source string is in the destination
string. However, that doesn't work with GCC, due to PR c++/89074 so
allocate a temporary buffer instead and copy out into that first, so
that overlapping source and destination don't matter. The allocation
isn't supported by the current Intel icc so use the loop as a fallback.

libstdc++-v3/ChangeLog:

	* include/bits/char_traits.h (__gnu_cxx::char_traits::move):
	Do not compare unrelated pointers during constant evaluation.
	* testsuite/21_strings/char_traits/requirements/constexpr_functions_c++20.cc:
	Improve tests for char_traits::move.
2021-11-18 16:14:15 +00:00
..
backward
bits libstdc++: Fix std::char_traits<C>::move for constexpr 2021-11-18 16:14:15 +00:00
c
c_compatibility
c_global
c_std
debug libstdc++: [_GLIBCXX_DEBUG] Remove _Safe_container<>::_M_safe() 2021-11-14 21:55:01 +01:00
decimal
experimental libstdc++: Use std::construct_at in net::ip::address 2021-11-17 17:28:52 +00:00
ext libstdc++: Implement constexpr std::basic_string for C++20 2021-11-16 16:43:20 +00:00
parallel
precompiled libstdc++: Implement std::spanstream for C++23 2021-11-13 11:45:31 +00:00
pstl
std libstdc++: Implement constexpr std::basic_string for C++20 2021-11-16 16:43:20 +00:00
tr1
tr2
Makefile.am libstdc++: Implement std::spanstream for C++23 2021-11-13 11:45:31 +00:00
Makefile.in libstdc++: Implement std::spanstream for C++23 2021-11-13 11:45:31 +00:00