1//===----------------------------------------------------------------------===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
9#ifndef _LIBCPP___UTILITY_REL_OPS_H
10#define _LIBCPP___UTILITY_REL_OPS_H
11
12#include <__config>
13
14#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
15# pragma GCC system_header
16#endif
17
18_LIBCPP_BEGIN_NAMESPACE_STD
19
20namespace rel_ops {
21
22template <class _Tp>
23inline _LIBCPP_DEPRECATED_IN_CXX20 _LIBCPP_HIDE_FROM_ABI bool operator!=(const _Tp& __x, const _Tp& __y) {
24 return !(__x == __y);
25}
26
27template <class _Tp>
28inline _LIBCPP_DEPRECATED_IN_CXX20 _LIBCPP_HIDE_FROM_ABI bool operator>(const _Tp& __x, const _Tp& __y) {
29 return __y < __x;
30}
31
32template <class _Tp>
33inline _LIBCPP_DEPRECATED_IN_CXX20 _LIBCPP_HIDE_FROM_ABI bool operator<=(const _Tp& __x, const _Tp& __y) {
34 return !(__y < __x);
35}
36
37template <class _Tp>
38inline _LIBCPP_DEPRECATED_IN_CXX20 _LIBCPP_HIDE_FROM_ABI bool operator>=(const _Tp& __x, const _Tp& __y) {
39 return !(__x < __y);
40}
41
42} // namespace rel_ops
43
44_LIBCPP_END_NAMESPACE_STD
45
46#endif // _LIBCPP___UTILITY_REL_OPS_H
47