diff mbox series

[committed] libstdc++: Fix condition for ranges::copy to use memmove [PR116754]

Message ID 20240922165107.1435627-1-jwakely@redhat.com
State New
Headers show
Series [committed] libstdc++: Fix condition for ranges::copy to use memmove [PR116754] | expand

Commit Message

Jonathan Wakely Sept. 22, 2024, 4:51 p.m. UTC
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 mbox series

Patch

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;