aboutsummaryrefslogtreecommitdiff
path: root/contrib/llvm-project/libcxx/include/__functional/ranges_operations.h
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/llvm-project/libcxx/include/__functional/ranges_operations.h')
-rw-r--r--contrib/llvm-project/libcxx/include/__functional/ranges_operations.h32
1 files changed, 17 insertions, 15 deletions
diff --git a/contrib/llvm-project/libcxx/include/__functional/ranges_operations.h b/contrib/llvm-project/libcxx/include/__functional/ranges_operations.h
index c344fc38f98d..0ed631d8a74b 100644
--- a/contrib/llvm-project/libcxx/include/__functional/ranges_operations.h
+++ b/contrib/llvm-project/libcxx/include/__functional/ranges_operations.h
@@ -14,7 +14,7 @@
#include <__concepts/totally_ordered.h>
#include <__config>
#include <__type_traits/integral_constant.h>
-#include <__type_traits/predicate_traits.h>
+#include <__type_traits/operation_traits.h>
#include <__utility/forward.h>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
@@ -31,8 +31,8 @@ struct equal_to {
template <class _Tp, class _Up>
requires equality_comparable_with<_Tp, _Up>
[[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr bool operator()(_Tp &&__t, _Up &&__u) const
- noexcept(noexcept(bool(_VSTD::forward<_Tp>(__t) == _VSTD::forward<_Up>(__u)))) {
- return _VSTD::forward<_Tp>(__t) == _VSTD::forward<_Up>(__u);
+ noexcept(noexcept(bool(std::forward<_Tp>(__t) == std::forward<_Up>(__u)))) {
+ return std::forward<_Tp>(__t) == std::forward<_Up>(__u);
}
using is_transparent = void;
@@ -42,8 +42,8 @@ struct not_equal_to {
template <class _Tp, class _Up>
requires equality_comparable_with<_Tp, _Up>
[[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr bool operator()(_Tp &&__t, _Up &&__u) const
- noexcept(noexcept(bool(!(_VSTD::forward<_Tp>(__t) == _VSTD::forward<_Up>(__u))))) {
- return !(_VSTD::forward<_Tp>(__t) == _VSTD::forward<_Up>(__u));
+ noexcept(noexcept(bool(!(std::forward<_Tp>(__t) == std::forward<_Up>(__u))))) {
+ return !(std::forward<_Tp>(__t) == std::forward<_Up>(__u));
}
using is_transparent = void;
@@ -53,8 +53,8 @@ struct less {
template <class _Tp, class _Up>
requires totally_ordered_with<_Tp, _Up>
[[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr bool operator()(_Tp &&__t, _Up &&__u) const
- noexcept(noexcept(bool(_VSTD::forward<_Tp>(__t) < _VSTD::forward<_Up>(__u)))) {
- return _VSTD::forward<_Tp>(__t) < _VSTD::forward<_Up>(__u);
+ noexcept(noexcept(bool(std::forward<_Tp>(__t) < std::forward<_Up>(__u)))) {
+ return std::forward<_Tp>(__t) < std::forward<_Up>(__u);
}
using is_transparent = void;
@@ -64,8 +64,8 @@ struct less_equal {
template <class _Tp, class _Up>
requires totally_ordered_with<_Tp, _Up>
[[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr bool operator()(_Tp &&__t, _Up &&__u) const
- noexcept(noexcept(bool(!(_VSTD::forward<_Up>(__u) < _VSTD::forward<_Tp>(__t))))) {
- return !(_VSTD::forward<_Up>(__u) < _VSTD::forward<_Tp>(__t));
+ noexcept(noexcept(bool(!(std::forward<_Up>(__u) < std::forward<_Tp>(__t))))) {
+ return !(std::forward<_Up>(__u) < std::forward<_Tp>(__t));
}
using is_transparent = void;
@@ -75,8 +75,8 @@ struct greater {
template <class _Tp, class _Up>
requires totally_ordered_with<_Tp, _Up>
[[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr bool operator()(_Tp &&__t, _Up &&__u) const
- noexcept(noexcept(bool(_VSTD::forward<_Up>(__u) < _VSTD::forward<_Tp>(__t)))) {
- return _VSTD::forward<_Up>(__u) < _VSTD::forward<_Tp>(__t);
+ noexcept(noexcept(bool(std::forward<_Up>(__u) < std::forward<_Tp>(__t)))) {
+ return std::forward<_Up>(__u) < std::forward<_Tp>(__t);
}
using is_transparent = void;
@@ -86,8 +86,8 @@ struct greater_equal {
template <class _Tp, class _Up>
requires totally_ordered_with<_Tp, _Up>
[[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr bool operator()(_Tp &&__t, _Up &&__u) const
- noexcept(noexcept(bool(!(_VSTD::forward<_Tp>(__t) < _VSTD::forward<_Up>(__u))))) {
- return !(_VSTD::forward<_Tp>(__t) < _VSTD::forward<_Up>(__u));
+ noexcept(noexcept(bool(!(std::forward<_Tp>(__t) < std::forward<_Up>(__u))))) {
+ return !(std::forward<_Tp>(__t) < std::forward<_Up>(__u));
}
using is_transparent = void;
@@ -95,8 +95,10 @@ struct greater_equal {
} // namespace ranges
-template <class _Lhs, class _Rhs>
-struct __is_trivial_equality_predicate<ranges::equal_to, _Lhs, _Rhs> : true_type {};
+// For ranges we do not require that the types on each side of the equality
+// operator are of the same type
+template <class _Tp, class _Up>
+struct __desugars_to<__equal_tag, ranges::equal_to, _Tp, _Up> : true_type {};
#endif // _LIBCPP_STD_VER >= 20