Skip to content

Commit c7463a9

Browse files
author
Arthur O'Dwyer
committed
[libc++] [NFC] s/_LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_CONCEPTS)/!defined(_LIBCPP_HAS_NO_CONCEPTS)/
Per Discord discussion, we're normalizing on a simple `!defined(_LIBCPP_HAS_NO_CONCEPTS)` so that we can do a big search-and-replace for `!defined(_LIBCPP_HAS_NO_CONCEPTS)` back into `_LIBCPP_STD_VER > 17` when we're ready to abandon support for concept-syntax-less compilers. Differential Revision: https://reviews.llvm.org/D118748 (cherry picked from commit 38db42d)
1 parent e3c2861 commit c7463a9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+88
-88
lines changed

libcxx/include/__compare/compare_partial_order_fallback.h

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

2323
_LIBCPP_BEGIN_NAMESPACE_STD
2424

25-
#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_CONCEPTS)
25+
#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
2626

2727
// [cmp.alg]
2828
namespace __compare_partial_order_fallback {
@@ -66,7 +66,7 @@ inline namespace __cpo {
6666
inline constexpr auto compare_partial_order_fallback = __compare_partial_order_fallback::__fn{};
6767
} // namespace __cpo
6868

69-
#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_CONCEPTS)
69+
#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
7070

7171
_LIBCPP_END_NAMESPACE_STD
7272

libcxx/include/__compare/compare_strong_order_fallback.h

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

2323
_LIBCPP_BEGIN_NAMESPACE_STD
2424

25-
#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_CONCEPTS)
25+
#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
2626

2727
// [cmp.alg]
2828
namespace __compare_strong_order_fallback {
@@ -63,7 +63,7 @@ inline namespace __cpo {
6363
inline constexpr auto compare_strong_order_fallback = __compare_strong_order_fallback::__fn{};
6464
} // namespace __cpo
6565

66-
#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_CONCEPTS)
66+
#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
6767

6868
_LIBCPP_END_NAMESPACE_STD
6969

libcxx/include/__compare/compare_three_way.h

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

2121
_LIBCPP_BEGIN_NAMESPACE_STD
2222

23-
#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_CONCEPTS)
23+
#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
2424

2525
struct _LIBCPP_TEMPLATE_VIS compare_three_way
2626
{
@@ -34,7 +34,7 @@ struct _LIBCPP_TEMPLATE_VIS compare_three_way
3434
using is_transparent = void;
3535
};
3636

37-
#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_CONCEPTS)
37+
#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
3838

3939
_LIBCPP_END_NAMESPACE_STD
4040

libcxx/include/__compare/compare_weak_order_fallback.h

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

2323
_LIBCPP_BEGIN_NAMESPACE_STD
2424

25-
#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_CONCEPTS)
25+
#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
2626

2727
// [cmp.alg]
2828
namespace __compare_weak_order_fallback {
@@ -63,7 +63,7 @@ inline namespace __cpo {
6363
inline constexpr auto compare_weak_order_fallback = __compare_weak_order_fallback::__fn{};
6464
} // namespace __cpo
6565

66-
#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_CONCEPTS)
66+
#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
6767

6868
_LIBCPP_END_NAMESPACE_STD
6969

libcxx/include/__compare/partial_order.h

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

2424
_LIBCPP_BEGIN_NAMESPACE_STD
2525

26-
#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_CONCEPTS)
26+
#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
2727

2828
// [cmp.alg]
2929
namespace __partial_order {
@@ -64,7 +64,7 @@ inline namespace __cpo {
6464
inline constexpr auto partial_order = __partial_order::__fn{};
6565
} // namespace __cpo
6666

67-
#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_CONCEPTS)
67+
#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
6868

6969
_LIBCPP_END_NAMESPACE_STD
7070

libcxx/include/__compare/strong_order.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ _LIBCPP_PUSH_MACROS
2929

3030
_LIBCPP_BEGIN_NAMESPACE_STD
3131

32-
#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_CONCEPTS)
32+
#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
3333

3434
// [cmp.alg]
3535
namespace __strong_order {
@@ -127,7 +127,7 @@ inline namespace __cpo {
127127
inline constexpr auto strong_order = __strong_order::__fn{};
128128
} // namespace __cpo
129129

130-
#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_CONCEPTS)
130+
#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
131131

132132
_LIBCPP_END_NAMESPACE_STD
133133

libcxx/include/__compare/synth_three_way.h

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

2222
_LIBCPP_BEGIN_NAMESPACE_STD
2323

24-
#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_CONCEPTS)
24+
#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
2525

2626
// [expos.only.func]
2727

@@ -44,7 +44,7 @@ _LIBCPP_HIDE_FROM_ABI inline constexpr auto __synth_three_way =
4444
template <class _Tp, class _Up = _Tp>
4545
using __synth_three_way_result = decltype(__synth_three_way(declval<_Tp&>(), declval<_Up&>()));
4646

47-
#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_CONCEPTS)
47+
#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
4848

4949
_LIBCPP_END_NAMESPACE_STD
5050

libcxx/include/__compare/three_way_comparable.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 _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_CONCEPTS)
27+
#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
2828

2929
template<class _Tp, class _Cat>
3030
concept __compares_as =
@@ -51,7 +51,7 @@ concept three_way_comparable_with =
5151
{ __u <=> __t } -> __compares_as<_Cat>;
5252
};
5353

54-
#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_CONCEPTS)
54+
#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
5555

5656
_LIBCPP_END_NAMESPACE_STD
5757

libcxx/include/__compare/weak_order.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 _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_CONCEPTS)
27+
#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
2828

2929
// [cmp.alg]
3030
namespace __weak_order {
@@ -93,7 +93,7 @@ inline namespace __cpo {
9393
inline constexpr auto weak_order = __weak_order::__fn{};
9494
} // namespace __cpo
9595

96-
#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_CONCEPTS)
96+
#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
9797

9898
_LIBCPP_END_NAMESPACE_STD
9999

libcxx/include/__concepts/arithmetic.h

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

1919
_LIBCPP_BEGIN_NAMESPACE_STD
2020

21-
#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_CONCEPTS)
21+
#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
2222

2323
// [concepts.arithmetic], arithmetic concepts
2424

@@ -41,7 +41,7 @@ concept __libcpp_unsigned_integer = __libcpp_is_unsigned_integer<_Tp>::value;
4141
template <class _Tp>
4242
concept __libcpp_signed_integer = __libcpp_is_signed_integer<_Tp>::value;
4343

44-
#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_CONCEPTS)
44+
#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
4545

4646
_LIBCPP_END_NAMESPACE_STD
4747

libcxx/include/__concepts/assignable.h

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

2222
_LIBCPP_BEGIN_NAMESPACE_STD
2323

24-
#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_CONCEPTS)
24+
#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
2525

2626
// [concept.assignable]
2727

@@ -33,7 +33,7 @@ concept assignable_from =
3333
{ __lhs = _VSTD::forward<_Rhs>(__rhs) } -> same_as<_Lhs>;
3434
};
3535

36-
#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_CONCEPTS)
36+
#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
3737

3838
_LIBCPP_END_NAMESPACE_STD
3939

libcxx/include/__concepts/boolean_testable.h

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

2020
_LIBCPP_BEGIN_NAMESPACE_STD
2121

22-
#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_CONCEPTS)
22+
#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
2323

2424
// [concepts.booleantestable]
2525

@@ -31,7 +31,7 @@ concept __boolean_testable = __boolean_testable_impl<_Tp> && requires(_Tp&& __t)
3131
{ !_VSTD::forward<_Tp>(__t) } -> __boolean_testable_impl;
3232
};
3333

34-
#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_CONCEPTS)
34+
#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
3535

3636
_LIBCPP_END_NAMESPACE_STD
3737

libcxx/include/__concepts/class_or_enum.h

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

1919
_LIBCPP_BEGIN_NAMESPACE_STD
2020

21-
#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_CONCEPTS)
21+
#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
2222

2323
// Whether a type is a class type or enumeration type according to the Core wording.
2424

@@ -29,7 +29,7 @@ concept __class_or_enum = is_class_v<_Tp> || is_union_v<_Tp> || is_enum_v<_Tp>;
2929
template<class _Tp>
3030
concept __workaround_52970 = is_class_v<__uncvref_t<_Tp>> || is_union_v<__uncvref_t<_Tp>>;
3131

32-
#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_CONCEPTS)
32+
#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
3333

3434
_LIBCPP_END_NAMESPACE_STD
3535

libcxx/include/__concepts/common_reference_with.h

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

2121
_LIBCPP_BEGIN_NAMESPACE_STD
2222

23-
#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_CONCEPTS)
23+
#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
2424

2525
// [concept.commonref]
2626

@@ -30,7 +30,7 @@ concept common_reference_with =
3030
convertible_to<_Tp, common_reference_t<_Tp, _Up>> &&
3131
convertible_to<_Up, common_reference_t<_Tp, _Up>>;
3232

33-
#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_CONCEPTS)
33+
#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
3434

3535
_LIBCPP_END_NAMESPACE_STD
3636

libcxx/include/__concepts/common_with.h

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

2121
_LIBCPP_BEGIN_NAMESPACE_STD
2222

23-
#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_CONCEPTS)
23+
#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
2424

2525
// [concept.common]
2626

@@ -40,7 +40,7 @@ concept common_with =
4040
add_lvalue_reference_t<const _Tp>,
4141
add_lvalue_reference_t<const _Up>>>;
4242

43-
#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_CONCEPTS)
43+
#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
4444

4545
_LIBCPP_END_NAMESPACE_STD
4646

libcxx/include/__concepts/constructible.h

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

2121
_LIBCPP_BEGIN_NAMESPACE_STD
2222

23-
#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_CONCEPTS)
23+
#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
2424

2525
// [concept.constructible]
2626
template<class _Tp, class... _Args>
@@ -49,7 +49,7 @@ concept copy_constructible =
4949
constructible_from<_Tp, const _Tp&> && convertible_to<const _Tp&, _Tp> &&
5050
constructible_from<_Tp, const _Tp> && convertible_to<const _Tp, _Tp>;
5151

52-
#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_CONCEPTS)
52+
#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
5353

5454
_LIBCPP_END_NAMESPACE_STD
5555

libcxx/include/__concepts/convertible_to.h

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

2020
_LIBCPP_BEGIN_NAMESPACE_STD
2121

22-
#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_CONCEPTS)
22+
#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
2323

2424
// [concept.convertible]
2525

@@ -30,7 +30,7 @@ concept convertible_to =
3030
static_cast<_To>(declval<_From>());
3131
};
3232

33-
#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_CONCEPTS)
33+
#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
3434

3535
_LIBCPP_END_NAMESPACE_STD
3636

libcxx/include/__concepts/copyable.h

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

2121
_LIBCPP_BEGIN_NAMESPACE_STD
2222

23-
#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_CONCEPTS)
23+
#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
2424

2525
// [concepts.object]
2626

@@ -32,7 +32,7 @@ concept copyable =
3232
assignable_from<_Tp&, const _Tp&> &&
3333
assignable_from<_Tp&, const _Tp>;
3434

35-
#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_CONCEPTS)
35+
#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
3636

3737
_LIBCPP_END_NAMESPACE_STD
3838

libcxx/include/__concepts/derived_from.h

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

1919
_LIBCPP_BEGIN_NAMESPACE_STD
2020

21-
#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_CONCEPTS)
21+
#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
2222

2323
// [concept.derived]
2424

@@ -27,7 +27,7 @@ concept derived_from =
2727
is_base_of_v<_Bp, _Dp> &&
2828
is_convertible_v<const volatile _Dp*, const volatile _Bp*>;
2929

30-
#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_CONCEPTS)
30+
#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
3131

3232
_LIBCPP_END_NAMESPACE_STD
3333

libcxx/include/__concepts/destructible.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@
1818

1919
_LIBCPP_BEGIN_NAMESPACE_STD
2020

21-
#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_CONCEPTS)
21+
#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
2222

2323
// [concept.destructible]
2424

2525
template<class _Tp>
2626
concept destructible = is_nothrow_destructible_v<_Tp>;
2727

28-
#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_CONCEPTS)
28+
#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
2929

3030
_LIBCPP_END_NAMESPACE_STD
3131

libcxx/include/__concepts/different_from.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@
1919

2020
_LIBCPP_BEGIN_NAMESPACE_STD
2121

22-
#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_CONCEPTS)
22+
#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
2323

2424
template<class _Tp, class _Up>
2525
concept __different_from = !same_as<remove_cvref_t<_Tp>, remove_cvref_t<_Up>>;
2626

27-
#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_CONCEPTS)
27+
#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
2828

2929
_LIBCPP_END_NAMESPACE_STD
3030

libcxx/include/__concepts/equality_comparable.h

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

2121
_LIBCPP_BEGIN_NAMESPACE_STD
2222

23-
#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_CONCEPTS)
23+
#if !defined(_LIBCPP_HAS_NO_CONCEPTS)
2424

2525
// [concept.equalitycomparable]
2626

@@ -46,7 +46,7 @@ concept equality_comparable_with =
4646
__make_const_lvalue_ref<_Up>>> &&
4747
__weakly_equality_comparable_with<_Tp, _Up>;
4848

49-
#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_CONCEPTS)
49+
#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
5050

5151
_LIBCPP_END_NAMESPACE_STD
5252

0 commit comments

Comments
 (0)