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 20 namespace rel_ops 21 { 22 23 template<class _Tp> 24 inline _LIBCPP_INLINE_VISIBILITY 25 bool 26 operator!=(const _Tp& __x, const _Tp& __y) 27 { 28 return !(__x == __y); 29 } 30 31 template<class _Tp> 32 inline _LIBCPP_INLINE_VISIBILITY 33 bool 34 operator> (const _Tp& __x, const _Tp& __y) 35 { 36 return __y < __x; 37 } 38 39 template<class _Tp> 40 inline _LIBCPP_INLINE_VISIBILITY 41 bool 42 operator<=(const _Tp& __x, const _Tp& __y) 43 { 44 return !(__y < __x); 45 } 46 47 template<class _Tp> 48 inline _LIBCPP_INLINE_VISIBILITY 49 bool 50 operator>=(const _Tp& __x, const _Tp& __y) 51 { 52 return !(__x < __y); 53 } 54 55 } // namespace rel_ops 56 57 _LIBCPP_END_NAMESPACE_STD 58 59 #endif // _LIBCPP___UTILITY_REL_OPS_H 60