summaryrefslogtreecommitdiff
path: root/libcxx/include
diff options
context:
space:
mode:
authorLouis Dionne <ldionne.2@gmail.com>2024-09-27 01:02:21 -0400
committerGitHub <noreply@github.com>2024-09-27 01:02:21 -0400
commit24bc3244d4e221f4e6740f45e2bf15a1441a3076 (patch)
tree5630743b4a4a8d02fa216941e01a2cda46d61034 /libcxx/include
parent09cd5a86733a362f12542a11ffd834cac885eb32 (diff)
[libc++][NFC] Rename fold.h to ranges_fold.h (#109696)
This follows the pattern we use consistently for ranges algorithms.
Diffstat (limited to 'libcxx/include')
-rw-r--r--libcxx/include/CMakeLists.txt2
-rw-r--r--libcxx/include/__algorithm/ranges_fold.h (renamed from libcxx/include/__algorithm/fold.h)6
-rw-r--r--libcxx/include/algorithm2
-rw-r--r--libcxx/include/module.modulemap2
4 files changed, 6 insertions, 6 deletions
diff --git a/libcxx/include/CMakeLists.txt b/libcxx/include/CMakeLists.txt
index c22590b0ddfd..bbd5057cff93 100644
--- a/libcxx/include/CMakeLists.txt
+++ b/libcxx/include/CMakeLists.txt
@@ -23,7 +23,6 @@ set(files
__algorithm/find_if.h
__algorithm/find_if_not.h
__algorithm/find_segment_if.h
- __algorithm/fold.h
__algorithm/for_each.h
__algorithm/for_each_n.h
__algorithm/for_each_segment.h
@@ -98,6 +97,7 @@ set(files
__algorithm/ranges_find_if.h
__algorithm/ranges_find_if_not.h
__algorithm/ranges_find_last.h
+ __algorithm/ranges_fold.h
__algorithm/ranges_for_each.h
__algorithm/ranges_for_each_n.h
__algorithm/ranges_generate.h
diff --git a/libcxx/include/__algorithm/fold.h b/libcxx/include/__algorithm/ranges_fold.h
index 1bcb3be9aada..d2c392139850 100644
--- a/libcxx/include/__algorithm/fold.h
+++ b/libcxx/include/__algorithm/ranges_fold.h
@@ -7,8 +7,8 @@
//
//===----------------------------------------------------------------------===//
-#ifndef _LIBCPP___ALGORITHM_FOLD_H
-#define _LIBCPP___ALGORITHM_FOLD_H
+#ifndef _LIBCPP___ALGORITHM_RANGES_FOLD_H
+#define _LIBCPP___ALGORITHM_RANGES_FOLD_H
#include <__concepts/assignable.h>
#include <__concepts/constructible.h>
@@ -126,4 +126,4 @@ _LIBCPP_END_NAMESPACE_STD
_LIBCPP_POP_MACROS
-#endif // _LIBCPP___ALGORITHM_FOLD_H
+#endif // _LIBCPP___ALGORITHM_RANGES_FOLD_H
diff --git a/libcxx/include/algorithm b/libcxx/include/algorithm
index 36fd035b7e51..17d63ce0cf1c 100644
--- a/libcxx/include/algorithm
+++ b/libcxx/include/algorithm
@@ -2020,10 +2020,10 @@ template <class BidirectionalIterator, class Compare>
#endif
#if _LIBCPP_STD_VER >= 23
-# include <__algorithm/fold.h>
# include <__algorithm/ranges_contains_subrange.h>
# include <__algorithm/ranges_ends_with.h>
# include <__algorithm/ranges_find_last.h>
+# include <__algorithm/ranges_fold.h>
# include <__algorithm/ranges_starts_with.h>
#endif // _LIBCPP_STD_VER >= 23
diff --git a/libcxx/include/module.modulemap b/libcxx/include/module.modulemap
index 0c5569e6bd9a..97330aa6ad28 100644
--- a/libcxx/include/module.modulemap
+++ b/libcxx/include/module.modulemap
@@ -412,7 +412,6 @@ module std [system] {
module find_if { header "__algorithm/find_if.h" }
module find_segment_if { header "__algorithm/find_segment_if.h" }
module find { header "__algorithm/find.h" }
- module fold { header "__algorithm/fold.h" }
module for_each_n { header "__algorithm/for_each_n.h" }
module for_each_segment { header "__algorithm/for_each_segment.h" }
module for_each { header "__algorithm/for_each.h" }
@@ -529,6 +528,7 @@ module std [system] {
module ranges_find_if { header "__algorithm/ranges_find_if.h" }
module ranges_find_last { header "__algorithm/ranges_find_last.h" }
module ranges_find { header "__algorithm/ranges_find.h" }
+ module ranges_fold { header "__algorithm/ranges_fold.h" }
module ranges_for_each_n {
header "__algorithm/ranges_for_each_n.h"
export std.algorithm.in_fun_result