relation.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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. #ifndef _LIBCPP___CONCEPTS_RELATION_H
  9. #define _LIBCPP___CONCEPTS_RELATION_H
  10. #include <__concepts/predicate.h>
  11. #include <__config>
  12. #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
  13. # pragma GCC system_header
  14. #endif
  15. _LIBCPP_BEGIN_NAMESPACE_STD
  16. #if _LIBCPP_STD_VER > 17
  17. // [concept.relation]
  18. template<class _Rp, class _Tp, class _Up>
  19. concept relation =
  20. predicate<_Rp, _Tp, _Tp> && predicate<_Rp, _Up, _Up> &&
  21. predicate<_Rp, _Tp, _Up> && predicate<_Rp, _Up, _Tp>;
  22. // [concept.equiv]
  23. template<class _Rp, class _Tp, class _Up>
  24. concept equivalence_relation = relation<_Rp, _Tp, _Up>;
  25. // [concept.strictweakorder]
  26. template<class _Rp, class _Tp, class _Up>
  27. concept strict_weak_order = relation<_Rp, _Tp, _Up>;
  28. #endif // _LIBCPP_STD_VER > 17
  29. _LIBCPP_END_NAMESPACE_STD
  30. #endif // _LIBCPP___CONCEPTS_RELATION_H