]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libstdc++: Fix condition for ranges::copy to use memmove [PR116754]
authorJonathan Wakely <jwakely@redhat.com>
Wed, 18 Sep 2024 16:47:49 +0000 (17:47 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Sun, 22 Sep 2024 16:45:06 +0000 (17:45 +0100)
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

index 2a36ba69775a90f69c886543cc7e180fdebaf023..40c628b38182df34b3f287311b9f444834b08c0a 100644 (file)
@@ -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;