Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / libcxx / include / __utility / rel_ops.h
blob5f8d42c0b2a3661fbb3bf0ef4b954e5536a22cec
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 //===----------------------------------------------------------------------===//
9 #ifndef _LIBCPP___UTILITY_REL_OPS_H
10 #define _LIBCPP___UTILITY_REL_OPS_H
12 #include <__config>
14 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
15 # pragma GCC system_header
16 #endif
18 _LIBCPP_BEGIN_NAMESPACE_STD
20 namespace rel_ops
23 template<class _Tp>
24 inline _LIBCPP_INLINE_VISIBILITY
25 bool
26 operator!=(const _Tp& __x, const _Tp& __y)
28 return !(__x == __y);
31 template<class _Tp>
32 inline _LIBCPP_INLINE_VISIBILITY
33 bool
34 operator> (const _Tp& __x, const _Tp& __y)
36 return __y < __x;
39 template<class _Tp>
40 inline _LIBCPP_INLINE_VISIBILITY
41 bool
42 operator<=(const _Tp& __x, const _Tp& __y)
44 return !(__y < __x);
47 template<class _Tp>
48 inline _LIBCPP_INLINE_VISIBILITY
49 bool
50 operator>=(const _Tp& __x, const _Tp& __y)
52 return !(__x < __y);
55 } // namespace rel_ops
57 _LIBCPP_END_NAMESPACE_STD
59 #endif // _LIBCPP___UTILITY_REL_OPS_H