xref: /freebsd-src/contrib/llvm-project/libcxx/include/__concepts/relation.h (revision 349cc55c9796c4596a5b9904cd3281af295f878f)
1*349cc55cSDimitry Andric //===----------------------------------------------------------------------===//
2*349cc55cSDimitry Andric //
3*349cc55cSDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4*349cc55cSDimitry Andric // See https://llvm.org/LICENSE.txt for license information.
5*349cc55cSDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6*349cc55cSDimitry Andric //
7*349cc55cSDimitry Andric //===----------------------------------------------------------------------===//
8*349cc55cSDimitry Andric 
9*349cc55cSDimitry Andric #ifndef _LIBCPP___CONCEPTS_RELATION_H
10*349cc55cSDimitry Andric #define _LIBCPP___CONCEPTS_RELATION_H
11*349cc55cSDimitry Andric 
12*349cc55cSDimitry Andric #include <__concepts/predicate.h>
13*349cc55cSDimitry Andric #include <__config>
14*349cc55cSDimitry Andric 
15*349cc55cSDimitry Andric #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
16*349cc55cSDimitry Andric #pragma GCC system_header
17*349cc55cSDimitry Andric #endif
18*349cc55cSDimitry Andric 
19*349cc55cSDimitry Andric _LIBCPP_BEGIN_NAMESPACE_STD
20*349cc55cSDimitry Andric 
21*349cc55cSDimitry Andric #if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_CONCEPTS)
22*349cc55cSDimitry Andric 
23*349cc55cSDimitry Andric // [concept.relation]
24*349cc55cSDimitry Andric 
25*349cc55cSDimitry Andric template<class _Rp, class _Tp, class _Up>
26*349cc55cSDimitry Andric concept relation =
27*349cc55cSDimitry Andric   predicate<_Rp, _Tp, _Tp> && predicate<_Rp, _Up, _Up> &&
28*349cc55cSDimitry Andric   predicate<_Rp, _Tp, _Up> && predicate<_Rp, _Up, _Tp>;
29*349cc55cSDimitry Andric 
30*349cc55cSDimitry Andric // [concept.equiv]
31*349cc55cSDimitry Andric 
32*349cc55cSDimitry Andric template<class _Rp, class _Tp, class _Up>
33*349cc55cSDimitry Andric concept equivalence_relation = relation<_Rp, _Tp, _Up>;
34*349cc55cSDimitry Andric 
35*349cc55cSDimitry Andric // [concept.strictweakorder]
36*349cc55cSDimitry Andric 
37*349cc55cSDimitry Andric template<class _Rp, class _Tp, class _Up>
38*349cc55cSDimitry Andric concept strict_weak_order = relation<_Rp, _Tp, _Up>;
39*349cc55cSDimitry Andric 
40*349cc55cSDimitry Andric #endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_CONCEPTS)
41*349cc55cSDimitry Andric 
42*349cc55cSDimitry Andric _LIBCPP_END_NAMESPACE_STD
43*349cc55cSDimitry Andric 
44*349cc55cSDimitry Andric #endif // _LIBCPP___CONCEPTS_RELATION_H
45