[libcxx-commits] [PATCH] D154613: [libc++] Fix std::move algorithm with trivial move-only types
Louis Dionne via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Jul 7 09:47:48 PDT 2023
ldionne marked an inline comment as done.
ldionne added inline comments.
================
Comment at: libcxx/test/libcxx/strings/c.strings/constexpr_memmove.pass.cpp:9
+
+// UNSUPPORTED: c++03
+// ADDITIONAL_COMPILE_FLAGS: -Wno-private-header
----------------
philnik wrote:
> Why is this unsupported in C++03?
Actually, for the same reason that `__bit_cast` won't work:
```
In file included from /c.strings/constexpr_memmove.pass.cpp:25:
include/c++/v1/__string/constexpr_c_functions.h:211:66: error: copying parameter of type 'CopyConstructible' invokes deleted constructor
std::__assign_trivially_copyable(__dest + (__count - 1), __builtin_bit_cast(_Tp, __src[__count - 1]));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/c.strings/constexpr_memmove.pass.cpp:92:23: note: in instantiation of function template specialization 'std::__constexpr_memmove<CopyConstructible, CopyConstructible, 0>' requested here
Dest* result = std::__constexpr_memmove(dst, src, std::__element_count(3));
^
/c.strings/constexpr_memmove.pass.cpp:112:3: note: in instantiation of function template specialization 'test_user_defined_types<CopyConstructible, CopyConstructible>' requested here
test_user_defined_types<CopyConstructible, CopyConstructible>();
^
/c.strings/constexpr_memmove.pass.cpp:41:3: note: 'CopyConstructible' has been explicitly marked deleted here
CopyConstructible(CopyConstructible&&) = delete;
^
```
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D154613/new/
https://reviews.llvm.org/D154613
More information about the libcxx-commits
mailing list