[libcxx-commits] [libcxx] [libc++][test] Fixes constexpr nasty_char_traits. (PR #90981)
Hristo Hristov via libcxx-commits
libcxx-commits at lists.llvm.org
Fri May 3 11:35:45 PDT 2024
================
@@ -98,23 +122,21 @@ constexpr_char_traits<CharT>::find(const char_type* s, std::size_t n, const char
}
template <class CharT>
-TEST_CONSTEXPR_CXX14 CharT*
-constexpr_char_traits<CharT>::move(char_type* s1, const char_type* s2, std::size_t n)
-{
- char_type* r = s1;
- if (s1 < s2)
- {
- for (; n; --n, ++s1, ++s2)
- assign(*s1, *s2);
- }
- else if (s2 < s1)
- {
- s1 += n;
- s2 += n;
- for (; n; --n)
- assign(*--s1, *--s2);
- }
- return r;
+TEST_CONSTEXPR_CXX14 CharT* constexpr_char_traits<CharT>::move(char_type* s1, const char_type* s2, std::size_t n) {
----------------
Zingam wrote:
Maybe also add `constexpr_char_traits` to the PR title?
https://github.com/llvm/llvm-project/pull/90981
More information about the libcxx-commits
mailing list