Skip to content

Commit

Permalink
Adding note about potential issue with ranges::iter_swap customizatio…
Browse files Browse the repository at this point in the history
…ns. (#1867)

---------
Co-authored-by: Dmitriy Sobolev <Dmitriy.Sobolev@intel.com>
Co-authored-by: Alexey Kukanov <alexey.kukanov@intel.com>
  • Loading branch information
timmiesmith authored Dec 2, 2024
1 parent 189ed14 commit 4983bf5
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,11 @@ Usage Example for Parallel Range Algorithms
oneapi::dpl::ranges::copy(oneapi::dpl::execution::dpcpp_default, view_in, std::span(vec_out));
}
Implementation Notes
--------------------
The ``sort`` and ``stable_sort`` algorithms use ``std::swap`` and not ``std::ranges::iter_swap`` for swapping elements.
As a result, customizations targeting ``std::ranges::iter_swap`` will not be respected.

.. rubric:: See also:

:doc:`range_based_api`

0 comments on commit 4983bf5

Please sign in to comment.