[libc++] Implement ranges::move{, _backward}
This patch also adds a new optimization to `std::move`. It unwraps three `reverse_iterator`s if the wrapped iterator is a `contiguous_iterator` and the iterated type is trivially_movable. This allows us to simplify `ranges::move_backward` to a forward to `std::move` without any pessimization.
Reviewed By: var-const, #libc
Spies: libcxx-commits, mgorny
Differential Revision: https://reviews.llvm.org/D126616
NOKEYCHECK=True
GitOrigin-RevId: 2c3bbac0c7154cd6a286e0e05aa62308836a3655
diff --git a/include/module.modulemap.in b/include/module.modulemap.in
index 7294f35..cd71a3c 100644
--- a/include/module.modulemap.in
+++ b/include/module.modulemap.in
@@ -338,6 +338,8 @@
module ranges_minmax { private header "__algorithm/ranges_minmax.h" }
module ranges_minmax_element { private header "__algorithm/ranges_minmax_element.h" }
module ranges_mismatch { private header "__algorithm/ranges_mismatch.h" }
+ module ranges_move { private header "__algorithm/ranges_move.h" }
+ module ranges_move_backward { private header "__algorithm/ranges_move_backward.h" }
module ranges_none_of { private header "__algorithm/ranges_none_of.h" }
module ranges_replace { private header "__algorithm/ranges_replace.h" }
module ranges_replace_if { private header "__algorithm/ranges_replace_if.h" }