concepts 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. // -*- C++ -*-
  2. //===----------------------------------------------------------------------===//
  3. //
  4. // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
  5. // See https://llvm.org/LICENSE.txt for license information.
  6. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  7. //
  8. //===----------------------------------------------------------------------===//
  9. #ifndef _LIBCPP_CONCEPTS
  10. #define _LIBCPP_CONCEPTS
  11. /*
  12. concepts synopsis
  13. namespace std {
  14. // [concepts.lang], language-related concepts
  15. // [concept.same], concept same_as
  16. template<class T, class U>
  17. concept same_as = see below;
  18. // [concept.derived], concept derived_from
  19. template<class Derived, class Base>
  20. concept derived_from = see below;
  21. // [concept.convertible], concept convertible_to
  22. template<class From, class To>
  23. concept convertible_to = see below;
  24. // [concept.commonref], concept common_reference_with
  25. template<class T, class U>
  26. concept common_reference_with = see below;
  27. // [concept.common], concept common_with
  28. template<class T, class U>
  29. concept common_with = see below;
  30. // [concepts.arithmetic], arithmetic concepts
  31. template<class T>
  32. concept integral = see below;
  33. template<class T>
  34. concept signed_integral = see below;
  35. template<class T>
  36. concept unsigned_integral = see below;
  37. template<class T>
  38. concept floating_point = see below;
  39. // [concept.assignable], concept assignable_from
  40. template<class LHS, class RHS>
  41. concept assignable_from = see below;
  42. // [concept.swappable], concept swappable
  43. namespace ranges {
  44. inline namespace unspecified {
  45. inline constexpr unspecified swap = unspecified;
  46. }
  47. }
  48. template<class T>
  49. concept swappable = see below;
  50. template<class T, class U>
  51. concept swappable_with = see below;
  52. // [concept.destructible], concept destructible
  53. template<class T>
  54. concept destructible = see below;
  55. // [concept.constructible], concept constructible_from
  56. template<class T, class... Args>
  57. concept constructible_from = see below;
  58. // [concept.default.init], concept default_initializable
  59. template<class T>
  60. concept default_initializable = see below;
  61. // [concept.moveconstructible], concept move_constructible
  62. template<class T>
  63. concept move_constructible = see below;
  64. // [concept.copyconstructible], concept copy_constructible
  65. template<class T>
  66. concept copy_constructible = see below;
  67. // [concept.equalitycomparable], concept equality_comparable
  68. template<class T>
  69. concept equality_comparable = see below;
  70. template<class T, class U>
  71. concept equality_comparable_with = see below;
  72. // [concept.totallyordered], concept totally_ordered
  73. template<class T>
  74. concept totally_ordered = see below;
  75. template<class T, class U>
  76. concept totally_ordered_with = see below;
  77. // [concepts.object], object concepts
  78. template<class T>
  79. concept movable = see below;
  80. template<class T>
  81. concept copyable = see below;
  82. template<class T>
  83. concept semiregular = see below;
  84. template<class T>
  85. concept regular = see below;
  86. // [concepts.callable], callable concepts
  87. // [concept.invocable], concept invocable
  88. template<class F, class... Args>
  89. concept invocable = see below;
  90. // [concept.regularinvocable], concept regular_invocable
  91. template<class F, class... Args>
  92. concept regular_invocable = see below;
  93. // [concept.predicate], concept predicate
  94. template<class F, class... Args>
  95. concept predicate = see below;
  96. // [concept.relation], concept relation
  97. template<class R, class T, class U>
  98. concept relation = see below;
  99. // [concept.equiv], concept equivalence_relation
  100. template<class R, class T, class U>
  101. concept equivalence_relation = see below;
  102. // [concept.strictweakorder], concept strict_weak_order
  103. template<class R, class T, class U>
  104. concept strict_weak_order = see below;
  105. }
  106. */
  107. #include <__concepts/arithmetic.h>
  108. #include <__concepts/assignable.h>
  109. #include <__concepts/boolean_testable.h>
  110. #include <__concepts/class_or_enum.h>
  111. #include <__concepts/common_reference_with.h>
  112. #include <__concepts/common_with.h>
  113. #include <__concepts/constructible.h>
  114. #include <__concepts/convertible_to.h>
  115. #include <__concepts/copyable.h>
  116. #include <__concepts/derived_from.h>
  117. #include <__concepts/destructible.h>
  118. #include <__concepts/different_from.h>
  119. #include <__concepts/equality_comparable.h>
  120. #include <__concepts/invocable.h>
  121. #include <__concepts/movable.h>
  122. #include <__concepts/predicate.h>
  123. #include <__concepts/regular.h>
  124. #include <__concepts/relation.h>
  125. #include <__concepts/same_as.h>
  126. #include <__concepts/semiregular.h>
  127. #include <__concepts/swappable.h>
  128. #include <__concepts/totally_ordered.h>
  129. #include <__config>
  130. #include <version>
  131. #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
  132. # pragma GCC system_header
  133. #endif
  134. #endif // _LIBCPP_CONCEPTS