Skip to content

Commit 55e34f3

Browse files
philnik777ldionne
authored andcommitted
[libc++] Always enable the ranges concepts
The ranges concepts were already available in libc++13, so we shouldn't guard them with `_LIBCPP_HAS_NO_INCOMPLETE_RANGES`. Fixes #54765 Differential Revision: https://reviews.llvm.org/D124011 (cherry picked from commit b177a90)
1 parent 5f66e72 commit 55e34f3

File tree

8 files changed

+5
-14
lines changed

8 files changed

+5
-14
lines changed

libcxx/include/__ranges/concepts.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,6 @@ namespace ranges {
6868
template <range _Rp>
6969
using range_rvalue_reference_t = iter_rvalue_reference_t<iterator_t<_Rp>>;
7070

71-
#if !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
72-
7371
// [range.sized]
7472
template <class _Tp>
7573
concept sized_range = range<_Tp> && requires(_Tp& __t) { ranges::size(__t); };
@@ -135,8 +133,6 @@ namespace ranges {
135133
(is_lvalue_reference_v<_Tp> ||
136134
(movable<remove_reference_t<_Tp>> && !__is_std_initializer_list<remove_cvref_t<_Tp>>))));
137135

138-
#endif // !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
139-
140136
} // namespace ranges
141137

142138
#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)

libcxx/include/__ranges/data.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
_LIBCPP_BEGIN_NAMESPACE_STD
2626

27-
#if !defined(_LIBCPP_HAS_NO_CONCEPTS) && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
27+
#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
2828

2929
// [range.prim.data]
3030

@@ -99,7 +99,7 @@ inline namespace __cpo {
9999
} // namespace __cpo
100100
} // namespace ranges
101101

102-
#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS) && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
102+
#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
103103

104104
_LIBCPP_END_NAMESPACE_STD
105105

libcxx/include/__ranges/size.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
_LIBCPP_BEGIN_NAMESPACE_STD
2626

27-
#if !defined(_LIBCPP_HAS_NO_CONCEPTS) && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
27+
#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
2828

2929
namespace ranges {
3030
template<class>
@@ -128,7 +128,7 @@ inline namespace __cpo {
128128
} // namespace __cpo
129129
} // namespace ranges
130130

131-
#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS) && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
131+
#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
132132

133133
_LIBCPP_END_NAMESPACE_STD
134134

libcxx/test/libcxx/ranges/has-no-incomplete-ranges.compile.pass.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525

2626
_LIBCPP_BEGIN_NAMESPACE_STD
2727
namespace ranges {
28-
int output_range;
2928
int data;
3029
int size;
3130
int prev;
@@ -37,5 +36,5 @@ namespace ranges {
3736
int filter_view;
3837
int join_view;
3938
int views; // this entire namespace should be absent
40-
}
39+
} // namespace ranges
4140
_LIBCPP_END_NAMESPACE_STD

libcxx/test/std/ranges/range.access/data.pass.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88

99
// UNSUPPORTED: c++03, c++11, c++14, c++17
1010
// UNSUPPORTED: libcpp-no-concepts
11-
// UNSUPPORTED: libcpp-has-no-incomplete-ranges
1211

1312
// std::ranges::data
1413

libcxx/test/std/ranges/range.access/size.pass.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88

99
// UNSUPPORTED: c++03, c++11, c++14, c++17
1010
// UNSUPPORTED: libcpp-no-concepts
11-
// UNSUPPORTED: libcpp-has-no-incomplete-ranges
1211

1312
// std::ranges::size
1413

libcxx/test/std/ranges/range.req/range.refinements/common_range.compile.pass.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88

99
// UNSUPPORTED: c++03, c++11, c++14, c++17
1010
// UNSUPPORTED: libcpp-no-concepts
11-
// UNSUPPORTED: libcpp-has-no-incomplete-ranges
1211

1312
// template<class R>
1413
// concept common_range;

libcxx/test/std/ranges/range.req/range.refinements/subsumption.compile.pass.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88

99
// UNSUPPORTED: c++03, c++11, c++14, c++17
1010
// UNSUPPORTED: libcpp-no-concepts
11-
// UNSUPPORTED: libcpp-has-no-incomplete-ranges
1211

1312
// template<class T>
1413
// concept input_iterator;

0 commit comments

Comments
 (0)