Skip to content

Commit 8e6bba2

Browse files
committed
[libc++][NFC] Rename fold.h to ranges_fold.h (llvm#109696)
This follows the pattern we use consistently for ranges algorithms. This is a re-application of 24bc324 which had been reverted in f11abac due to unrelated failures.
1 parent 735a5f6 commit 8e6bba2

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
@@ -714,7 +714,6 @@ module std_private_algorithm_find_first_of [system
714714
module std_private_algorithm_find_if [system] { header "__algorithm/find_if.h" }
715715
module std_private_algorithm_find_if_not [system] { header "__algorithm/find_if_not.h" }
716716
module std_private_algorithm_find_segment_if [system] { header "__algorithm/find_segment_if.h" }
717-
module std_private_algorithm_fold [system] { header "__algorithm/fold.h" }
718717
module std_private_algorithm_for_each [system] { header "__algorithm/for_each.h" }
719718
module std_private_algorithm_for_each_n [system] { header "__algorithm/for_each_n.h" }
720719
module std_private_algorithm_for_each_segment [system] { header "__algorithm/for_each_segment.h" }
@@ -823,6 +822,7 @@ module std_private_algorithm_ranges_find_first_of [system
823822
module std_private_algorithm_ranges_find_if [system] { header "__algorithm/ranges_find_if.h" }
824823
module std_private_algorithm_ranges_find_if_not [system] { header "__algorithm/ranges_find_if_not.h" }
825824
module std_private_algorithm_ranges_find_last [system] { header "__algorithm/ranges_find_last.h" }
825+
module std_private_algorithm_ranges_fold [system] { header "__algorithm/ranges_fold.h" }
826826
module std_private_algorithm_ranges_for_each [system] {
827827
header "__algorithm/ranges_for_each.h"
828828
export std_private_algorithm_in_fun_result

0 commit comments

Comments
 (0)