Skip to content

Commit

Permalink
[libc++][modules] Fixes C++20 build errors.
Browse files Browse the repository at this point in the history
Recent CI changes have disabled testing modules in different
configurations. This broke building the std and std.compat module in
C++20. This was found by the CI in llvm#76246.
  • Loading branch information
mordante committed Dec 23, 2023
1 parent b203d53 commit 5841140
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions libcxx/modules/std/algorithm.inc
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ export namespace std {
using std::ranges::in_in_result;
using std::ranges::in_out_out_result;
using std::ranges::in_out_result;
#if _LIBCPP_STD_VER >= 23
using std::ranges::in_value_result;
#endif
using std::ranges::min_max_result;
// using std::ranges::out_value_result;
} // namespace ranges
Expand All @@ -40,13 +42,15 @@ export namespace std {
using std::ranges::none_of;
}

#if _LIBCPP_STD_VER >= 23
// [alg.contains], contains
namespace ranges {
using std::ranges::contains;
#if 0
using std::ranges::contains_subrange;
#endif
} // namespace ranges
#endif // _LIBCPP_STD_VER >= 23

// [alg.foreach], for each
using std::for_each;
Expand Down

0 comments on commit 5841140

Please sign in to comment.