xref: /llvm-project/libcxx/include/__concepts/relation.h (revision 5aa03b648b827128d439f705cd7d57d59673741d)
158915667SArthur O'Dwyer //===----------------------------------------------------------------------===//
258915667SArthur O'Dwyer //
358915667SArthur O'Dwyer // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
458915667SArthur O'Dwyer // See https://llvm.org/LICENSE.txt for license information.
558915667SArthur O'Dwyer // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
658915667SArthur O'Dwyer //
758915667SArthur O'Dwyer //===----------------------------------------------------------------------===//
858915667SArthur O'Dwyer 
958915667SArthur O'Dwyer #ifndef _LIBCPP___CONCEPTS_RELATION_H
1058915667SArthur O'Dwyer #define _LIBCPP___CONCEPTS_RELATION_H
1158915667SArthur O'Dwyer 
1258915667SArthur O'Dwyer #include <__concepts/predicate.h>
1358915667SArthur O'Dwyer #include <__config>
1458915667SArthur O'Dwyer 
1558915667SArthur O'Dwyer #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
1658915667SArthur O'Dwyer #  pragma GCC system_header
1758915667SArthur O'Dwyer #endif
1858915667SArthur O'Dwyer 
1958915667SArthur O'Dwyer _LIBCPP_BEGIN_NAMESPACE_STD
2058915667SArthur O'Dwyer 
214f15267dSNikolas Klauser #if _LIBCPP_STD_VER >= 20
2258915667SArthur O'Dwyer 
2358915667SArthur O'Dwyer // [concept.relation]
2458915667SArthur O'Dwyer 
2558915667SArthur O'Dwyer template <class _Rp, class _Tp, class _Up>
2658915667SArthur O'Dwyer concept relation =
27*5aa03b64SLouis Dionne     predicate<_Rp, _Tp, _Tp> && predicate<_Rp, _Up, _Up> && predicate<_Rp, _Tp, _Up> && predicate<_Rp, _Up, _Tp>;
2858915667SArthur O'Dwyer 
2958915667SArthur O'Dwyer // [concept.equiv]
3058915667SArthur O'Dwyer 
3158915667SArthur O'Dwyer template <class _Rp, class _Tp, class _Up>
3258915667SArthur O'Dwyer concept equivalence_relation = relation<_Rp, _Tp, _Up>;
3358915667SArthur O'Dwyer 
3458915667SArthur O'Dwyer // [concept.strictweakorder]
3558915667SArthur O'Dwyer 
3658915667SArthur O'Dwyer template <class _Rp, class _Tp, class _Up>
3758915667SArthur O'Dwyer concept strict_weak_order = relation<_Rp, _Tp, _Up>;
3858915667SArthur O'Dwyer 
394f15267dSNikolas Klauser #endif // _LIBCPP_STD_VER >= 20
4058915667SArthur O'Dwyer 
4158915667SArthur O'Dwyer _LIBCPP_END_NAMESPACE_STD
4258915667SArthur O'Dwyer 
4358915667SArthur O'Dwyer #endif // _LIBCPP___CONCEPTS_RELATION_H
44