Skip to content

Commit 24bc324

Browse files
authored
[libc++][NFC] Rename fold.h to ranges_fold.h (llvm#109696)
This follows the pattern we use consistently for ranges algorithms.
1 parent 09cd5a8 commit 24bc324

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

libcxx/include/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ set(files
2323
__algorithm/find_if.h
2424
__algorithm/find_if_not.h
2525
__algorithm/find_segment_if.h
26-
__algorithm/fold.h
2726
__algorithm/for_each.h
2827
__algorithm/for_each_n.h
2928
__algorithm/for_each_segment.h
@@ -98,6 +97,7 @@ set(files
9897
__algorithm/ranges_find_if.h
9998
__algorithm/ranges_find_if_not.h
10099
__algorithm/ranges_find_last.h
100+
__algorithm/ranges_fold.h
101101
__algorithm/ranges_for_each.h
102102
__algorithm/ranges_for_each_n.h
103103
__algorithm/ranges_generate.h

libcxx/include/__algorithm/fold.h renamed to libcxx/include/__algorithm/ranges_fold.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
//
88
//===----------------------------------------------------------------------===//
99

10-
#ifndef _LIBCPP___ALGORITHM_FOLD_H
11-
#define _LIBCPP___ALGORITHM_FOLD_H
10+
#ifndef _LIBCPP___ALGORITHM_RANGES_FOLD_H
11+
#define _LIBCPP___ALGORITHM_RANGES_FOLD_H
1212

1313
#include <__concepts/assignable.h>
1414
#include <__concepts/constructible.h>
@@ -126,4 +126,4 @@ _LIBCPP_END_NAMESPACE_STD
126126

127127
_LIBCPP_POP_MACROS
128128

129-
#endif // _LIBCPP___ALGORITHM_FOLD_H
129+
#endif // _LIBCPP___ALGORITHM_RANGES_FOLD_H

libcxx/include/algorithm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2020,10 +2020,10 @@ template <class BidirectionalIterator, class Compare>
20202020
#endif
20212021

20222022
#if _LIBCPP_STD_VER >= 23
2023-
# include <__algorithm/fold.h>
20242023
# include <__algorithm/ranges_contains_subrange.h>
20252024
# include <__algorithm/ranges_ends_with.h>
20262025
# include <__algorithm/ranges_find_last.h>
2026+
# include <__algorithm/ranges_fold.h>
20272027
# include <__algorithm/ranges_starts_with.h>
20282028
#endif // _LIBCPP_STD_VER >= 23
20292029

libcxx/include/module.modulemap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,6 @@ module std [system] {
412412
module find_if { header "__algorithm/find_if.h" }
413413
module find_segment_if { header "__algorithm/find_segment_if.h" }
414414
module find { header "__algorithm/find.h" }
415-
module fold { header "__algorithm/fold.h" }
416415
module for_each_n { header "__algorithm/for_each_n.h" }
417416
module for_each_segment { header "__algorithm/for_each_segment.h" }
418417
module for_each { header "__algorithm/for_each.h" }
@@ -529,6 +528,7 @@ module std [system] {
529528
module ranges_find_if { header "__algorithm/ranges_find_if.h" }
530529
module ranges_find_last { header "__algorithm/ranges_find_last.h" }
531530
module ranges_find { header "__algorithm/ranges_find.h" }
531+
module ranges_fold { header "__algorithm/ranges_fold.h" }
532532
module ranges_for_each_n {
533533
header "__algorithm/ranges_for_each_n.h"
534534
export std.algorithm.in_fun_result

0 commit comments

Comments
 (0)