Skip to content

Commit

Permalink
[libc++][NFC] Rename fold.h to ranges_fold.h
Browse files Browse the repository at this point in the history
This follows the pattern we use consistently for ranges algorithms.
  • Loading branch information
ldionne committed Sep 23, 2024
1 parent ef44e46 commit 2f5f11f
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion libcxx/include/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -126,4 +126,4 @@ _LIBCPP_END_NAMESPACE_STD

_LIBCPP_POP_MACROS

#endif // _LIBCPP___ALGORITHM_FOLD_H
#endif // _LIBCPP___ALGORITHM_RANGES_FOLD_H
2 changes: 1 addition & 1 deletion libcxx/include/algorithm
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion libcxx/include/module.modulemap
Original file line number Diff line number Diff line change
Expand Up @@ -714,7 +714,6 @@ module std_private_algorithm_find_first_of [system
module std_private_algorithm_find_if [system] { header "__algorithm/find_if.h" }
module std_private_algorithm_find_if_not [system] { header "__algorithm/find_if_not.h" }
module std_private_algorithm_find_segment_if [system] { header "__algorithm/find_segment_if.h" }
module std_private_algorithm_fold [system] { header "__algorithm/fold.h" }
module std_private_algorithm_for_each [system] { header "__algorithm/for_each.h" }
module std_private_algorithm_for_each_n [system] { header "__algorithm/for_each_n.h" }
module std_private_algorithm_for_each_segment [system] { header "__algorithm/for_each_segment.h" }
Expand Down Expand Up @@ -823,6 +822,7 @@ module std_private_algorithm_ranges_find_first_of [system
module std_private_algorithm_ranges_find_if [system] { header "__algorithm/ranges_find_if.h" }
module std_private_algorithm_ranges_find_if_not [system] { header "__algorithm/ranges_find_if_not.h" }
module std_private_algorithm_ranges_find_last [system] { header "__algorithm/ranges_find_last.h" }
module std_private_algorithm_ranges_fold [system] { header "__algorithm/ranges_fold.h" }
module std_private_algorithm_ranges_for_each [system] {
header "__algorithm/ranges_for_each.h"
export std_private_algorithm_in_fun_result
Expand Down

0 comments on commit 2f5f11f

Please sign in to comment.