[libcxx-commits] [libcxx] [libc++][IWYU] Remove `std::move` header in `std::for_each` (PR #164272)
Connector Switch via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Oct 21 08:00:52 PDT 2025
https://github.com/c8ef updated https://github.com/llvm/llvm-project/pull/164272
>From 5af23174ae8e675a2642b49876c7bd85bb7cd2b2 Mon Sep 17 00:00:00 2001
From: c8ef <c8ef at outlook.com>
Date: Mon, 20 Oct 2025 23:44:26 +0800
Subject: [PATCH 1/2] [libc++][IWYU] Remove std::move header in std::for_each
---
libcxx/include/__algorithm/for_each.h | 1 -
1 file changed, 1 deletion(-)
diff --git a/libcxx/include/__algorithm/for_each.h b/libcxx/include/__algorithm/for_each.h
index e31fcae83a332..c80195a83287f 100644
--- a/libcxx/include/__algorithm/for_each.h
+++ b/libcxx/include/__algorithm/for_each.h
@@ -16,7 +16,6 @@
#include <__iterator/segmented_iterator.h>
#include <__type_traits/enable_if.h>
#include <__type_traits/invoke.h>
-#include <__utility/move.h>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
>From a616fdf8d1809599c2469670c41e5fb6eb55021e Mon Sep 17 00:00:00 2001
From: c8ef <c8ef at outlook.com>
Date: Tue, 21 Oct 2025 23:00:32 +0800
Subject: [PATCH 2/2] Remove undef macros
---
libcxx/include/__algorithm/for_each.h | 5 -----
1 file changed, 5 deletions(-)
diff --git a/libcxx/include/__algorithm/for_each.h b/libcxx/include/__algorithm/for_each.h
index c80195a83287f..6fb66d25a2462 100644
--- a/libcxx/include/__algorithm/for_each.h
+++ b/libcxx/include/__algorithm/for_each.h
@@ -21,9 +21,6 @@
# pragma GCC system_header
#endif
-_LIBCPP_PUSH_MACROS
-#include <__undef_macros>
-
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _InputIterator, class _Sent, class _Func, class _Proj>
@@ -59,6 +56,4 @@ for_each(_InputIterator __first, _InputIterator __last, _Func __f) {
_LIBCPP_END_NAMESPACE_STD
-_LIBCPP_POP_MACROS
-
#endif // _LIBCPP___ALGORITHM_FOR_EACH_H
More information about the libcxx-commits
mailing list