[libcxx-commits] [libcxx] 99789ca - [libc++] Add tests for LWG3798 and mark it as Complete (#210640)
via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Jul 20 00:32:28 PDT 2026
Author: A. Jiang
Date: 2026-07-20T15:32:23+08:00
New Revision: 99789ca18a7982a0b8d63e681d957590f67455c4
URL: https://github.com/llvm/llvm-project/commit/99789ca18a7982a0b8d63e681d957590f67455c4
DIFF: https://github.com/llvm/llvm-project/commit/99789ca18a7982a0b8d63e681d957590f67455c4.diff
LOG: [libc++] Add tests for LWG3798 and mark it as Complete (#210640)
Added:
Modified:
libcxx/docs/Status/Cxx23Issues.csv
libcxx/test/std/ranges/range.adaptors/range.adjacent.transform/helpers.h
libcxx/test/std/ranges/range.adaptors/range.adjacent.transform/iterator/member_types.compile.pass.cpp
Removed:
################################################################################
diff --git a/libcxx/docs/Status/Cxx23Issues.csv b/libcxx/docs/Status/Cxx23Issues.csv
index 91c4dc462c0c9..db38715a98973 100644
--- a/libcxx/docs/Status/Cxx23Issues.csv
+++ b/libcxx/docs/Status/Cxx23Issues.csv
@@ -234,7 +234,7 @@
"`LWG3792 <https://wg21.link/LWG3792>`__","``__cpp_lib_constexpr_algorithms`` should also be defined in ``<utility>``","2022-11 (Kona)","|Complete|","16","`#105046 <https://github.com/llvm/llvm-project/issues/105046>`__",""
"`LWG3795 <https://wg21.link/LWG3795>`__","Self-move-assignment of ``std::future`` and ``std::shared_future`` have unimplementable postconditions","2022-11 (Kona)","","","`#105047 <https://github.com/llvm/llvm-project/issues/105047>`__",""
"`LWG3796 <https://wg21.link/LWG3796>`__","``movable-box`` as member should use ``default-initialization`` instead of ``copy-initialization``","2022-11 (Kona)","","","`#105048 <https://github.com/llvm/llvm-project/issues/105048>`__",""
-"`LWG3798 <https://wg21.link/LWG3798>`__","Rvalue reference and ``iterator_category``","2022-11 (Kona)","|Partial|","","`#105049 <https://github.com/llvm/llvm-project/issues/105049>`__","``adjacent_transform_view`` hasn't been done yet since this type isn't implemented yet"
+"`LWG3798 <https://wg21.link/LWG3798>`__","Rvalue reference and ``iterator_category``","2022-11 (Kona)","|Complete|","22","`#105049 <https://github.com/llvm/llvm-project/issues/105049>`__",""
"`LWG3801 <https://wg21.link/LWG3801>`__","``cartesian_product_view::iterator::distance-from`` ignores the size of last underlying range","2022-11 (Kona)","","","`#105051 <https://github.com/llvm/llvm-project/issues/105051>`__",""
"`LWG3814 <https://wg21.link/LWG3814>`__","Add freestanding items requested by NB comments","2022-11 (Kona)","","","`#105052 <https://github.com/llvm/llvm-project/issues/105052>`__",""
"`LWG3816 <https://wg21.link/LWG3816>`__","``flat_map`` and ``flat_multimap`` should impose sequence container requirements","2022-11 (Kona)","","","`#105053 <https://github.com/llvm/llvm-project/issues/105053>`__",""
diff --git a/libcxx/test/std/ranges/range.adaptors/range.adjacent.transform/helpers.h b/libcxx/test/std/ranges/range.adaptors/range.adjacent.transform/helpers.h
index 39f2f856c149b..770cd66d011ea 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.adjacent.transform/helpers.h
+++ b/libcxx/test/std/ranges/range.adaptors/range.adjacent.transform/helpers.h
@@ -13,6 +13,7 @@
#include <functional>
#include <numeric>
#include <tuple>
+#include <utility>
// intentionally not using meta programming for the expected tuple types
@@ -35,6 +36,10 @@ struct GetFirst {
constexpr decltype(auto) operator()(auto&& first, auto&&...) const { return std::forward<decltype(first)>(first); }
};
+struct GetFirstAsXvalue {
+ static constexpr decltype(auto) operator()(auto&& first, auto&&...) { return std::move(first); }
+};
+
template <std::size_t N>
struct ValidateTieFromIndex {
constexpr void operator()(auto&& buffer, auto&& tuple, std::size_t idx) const {
diff --git a/libcxx/test/std/ranges/range.adaptors/range.adjacent.transform/iterator/member_types.compile.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.adjacent.transform/iterator/member_types.compile.pass.cpp
index 684569516d747..6105dde565082 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.adjacent.transform/iterator/member_types.compile.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.adjacent.transform/iterator/member_types.compile.pass.cpp
@@ -139,6 +139,10 @@ void test() {
test<GetFirst, 2, int, false>();
test<GetFirst, 3, int, false>();
+ test<GetFirstAsXvalue, 1, int, false>();
+ test<GetFirstAsXvalue, 2, int, false>();
+ test<GetFirstAsXvalue, 3, int, false>();
+
test<Multiply, 1, int, true>();
test<Multiply, 2, int, true>();
test<Multiply, 3, int, true>();
More information about the libcxx-commits
mailing list