Skip to content

Commit 5841140

Browse files
committed
[libc++][modules] Fixes C++20 build errors.
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 #76246.
1 parent b203d53 commit 5841140

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

libcxx/modules/std/algorithm.inc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ export namespace std {
1616
using std::ranges::in_in_result;
1717
using std::ranges::in_out_out_result;
1818
using std::ranges::in_out_result;
19+
#if _LIBCPP_STD_VER >= 23
1920
using std::ranges::in_value_result;
21+
#endif
2022
using std::ranges::min_max_result;
2123
// using std::ranges::out_value_result;
2224
} // namespace ranges
@@ -40,13 +42,15 @@ export namespace std {
4042
using std::ranges::none_of;
4143
}
4244

45+
#if _LIBCPP_STD_VER >= 23
4346
// [alg.contains], contains
4447
namespace ranges {
4548
using std::ranges::contains;
4649
#if 0
4750
using std::ranges::contains_subrange;
4851
#endif
4952
} // namespace ranges
53+
#endif // _LIBCPP_STD_VER >= 23
5054

5155
// [alg.foreach], for each
5256
using std::for_each;

0 commit comments

Comments
 (0)