[committed] libstdc++: Fix condition for ranges::copy to use memmove [PR116754]
Jonathan Wakely
jwakely@redhat.com
Sun Sep 22 16:51:01 GMT 2024
Tested x86_64-linux. Pushed to trunk.
-- >8 --
libstdc++-v3/ChangeLog:
PR libstdc++/116754
* include/bits/ranges_algobase.h (__copy_or_move): Fix order of
arguments to __memcpyable.
---
libstdc++-v3/include/bits/ranges_algobase.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libstdc++-v3/include/bits/ranges_algobase.h b/libstdc++-v3/include/bits/ranges_algobase.h
index 2a36ba69775..40c628b3818 100644
--- a/libstdc++-v3/include/bits/ranges_algobase.h
+++ b/libstdc++-v3/include/bits/ranges_algobase.h
@@ -286,7 +286,7 @@ namespace ranges
{
if (!std::__is_constant_evaluated())
{
- if constexpr (__memcpyable<_Iter, _Out>::__value)
+ if constexpr (__memcpyable<_Out, _Iter>::__value)
{
using _ValueTypeI = iter_value_t<_Iter>;
auto __num = __last - __first;
--
2.46.0
More information about the Libstdc++
mailing list