[rtsan] Remove mkfifoat interceptor (#116997)
[llvm-project.git] / libcxx / include / __concepts / equality_comparable.h
blob278fc76409289ba0e9e7ef1f0579b7ca2182ca4f
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___CONCEPTS_EQUALITY_COMPARABLE_H
10 #define _LIBCPP___CONCEPTS_EQUALITY_COMPARABLE_H
12 #include <__concepts/boolean_testable.h>
13 #include <__concepts/common_reference_with.h>
14 #include <__config>
15 #include <__type_traits/common_reference.h>
16 #include <__type_traits/make_const_lvalue_ref.h>
18 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
19 # pragma GCC system_header
20 #endif
22 _LIBCPP_BEGIN_NAMESPACE_STD
24 #if _LIBCPP_STD_VER >= 20
26 // [concept.equalitycomparable]
28 template <class _Tp, class _Up>
29 concept __weakly_equality_comparable_with =
30 requires(__make_const_lvalue_ref<_Tp> __t, __make_const_lvalue_ref<_Up> __u) {
31 { __t == __u } -> __boolean_testable;
32 { __t != __u } -> __boolean_testable;
33 { __u == __t } -> __boolean_testable;
34 { __u != __t } -> __boolean_testable;
37 template <class _Tp>
38 concept equality_comparable = __weakly_equality_comparable_with<_Tp, _Tp>;
40 // clang-format off
41 template <class _Tp, class _Up>
42 concept equality_comparable_with =
43 equality_comparable<_Tp> && equality_comparable<_Up> &&
44 common_reference_with<__make_const_lvalue_ref<_Tp>, __make_const_lvalue_ref<_Up>> &&
45 equality_comparable<
46 common_reference_t<
47 __make_const_lvalue_ref<_Tp>,
48 __make_const_lvalue_ref<_Up>>> &&
49 __weakly_equality_comparable_with<_Tp, _Up>;
50 // clang-format on
52 #endif // _LIBCPP_STD_VER >= 20
54 _LIBCPP_END_NAMESPACE_STD
56 #endif // _LIBCPP___CONCEPTS_EQUALITY_COMPARABLE_H