xref: /openbsd-src/gnu/llvm/libcxx/include/concepts (revision 4bdff4bed0e3d54e55670334c7d0077db4170f86)
1037e7968Spatrick// -*- C++ -*-
2*4bdff4beSrobert//===----------------------------------------------------------------------===//
3037e7968Spatrick//
4037e7968Spatrick// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
5037e7968Spatrick// See https://llvm.org/LICENSE.txt for license information.
6037e7968Spatrick// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7037e7968Spatrick//
8037e7968Spatrick//===----------------------------------------------------------------------===//
9037e7968Spatrick
10037e7968Spatrick#ifndef _LIBCPP_CONCEPTS
11037e7968Spatrick#define _LIBCPP_CONCEPTS
12037e7968Spatrick
13037e7968Spatrick/*
14037e7968Spatrick    concepts synopsis
15037e7968Spatricknamespace std {
16037e7968Spatrick  // [concepts.lang], language-related concepts
17037e7968Spatrick  // [concept.same], concept same_as
18037e7968Spatrick  template<class T, class U>
19037e7968Spatrick    concept same_as = see below;
20037e7968Spatrick
21037e7968Spatrick  // [concept.derived], concept derived_from
22037e7968Spatrick  template<class Derived, class Base>
23037e7968Spatrick    concept derived_from = see below;
24037e7968Spatrick
25037e7968Spatrick  // [concept.convertible], concept convertible_to
26037e7968Spatrick  template<class From, class To>
27037e7968Spatrick    concept convertible_to = see below;
28037e7968Spatrick
29037e7968Spatrick  // [concept.commonref], concept common_reference_with
30037e7968Spatrick  template<class T, class U>
31037e7968Spatrick    concept common_reference_with = see below;
32037e7968Spatrick
33037e7968Spatrick  // [concept.common], concept common_with
34037e7968Spatrick  template<class T, class U>
35037e7968Spatrick    concept common_with = see below;
36037e7968Spatrick
37037e7968Spatrick  // [concepts.arithmetic], arithmetic concepts
38037e7968Spatrick  template<class T>
39037e7968Spatrick    concept integral = see below;
40037e7968Spatrick  template<class T>
41037e7968Spatrick    concept signed_integral = see below;
42037e7968Spatrick  template<class T>
43037e7968Spatrick    concept unsigned_integral = see below;
44037e7968Spatrick  template<class T>
45037e7968Spatrick    concept floating_point = see below;
46037e7968Spatrick
47037e7968Spatrick  // [concept.assignable], concept assignable_from
48037e7968Spatrick  template<class LHS, class RHS>
49037e7968Spatrick    concept assignable_from = see below;
50037e7968Spatrick
51037e7968Spatrick  // [concept.swappable], concept swappable
52037e7968Spatrick  namespace ranges {
53037e7968Spatrick    inline namespace unspecified {
54037e7968Spatrick      inline constexpr unspecified swap = unspecified;
55037e7968Spatrick    }
56037e7968Spatrick  }
57037e7968Spatrick  template<class T>
58037e7968Spatrick    concept swappable = see below;
59037e7968Spatrick  template<class T, class U>
60037e7968Spatrick    concept swappable_with = see below;
61037e7968Spatrick
62037e7968Spatrick  // [concept.destructible], concept destructible
63037e7968Spatrick  template<class T>
64037e7968Spatrick    concept destructible = see below;
65037e7968Spatrick
66037e7968Spatrick  // [concept.constructible], concept constructible_from
67037e7968Spatrick  template<class T, class... Args>
68037e7968Spatrick    concept constructible_from = see below;
69037e7968Spatrick
7076d0caaeSpatrick  // [concept.default.init], concept default_initializable
71037e7968Spatrick  template<class T>
7276d0caaeSpatrick    concept default_initializable = see below;
73037e7968Spatrick
74037e7968Spatrick  // [concept.moveconstructible], concept move_constructible
75037e7968Spatrick  template<class T>
76037e7968Spatrick    concept move_constructible = see below;
77037e7968Spatrick
78037e7968Spatrick  // [concept.copyconstructible], concept copy_constructible
79037e7968Spatrick  template<class T>
80037e7968Spatrick    concept copy_constructible = see below;
81037e7968Spatrick
82037e7968Spatrick  // [concept.equalitycomparable], concept equality_comparable
83037e7968Spatrick  template<class T>
84037e7968Spatrick    concept equality_comparable = see below;
85037e7968Spatrick  template<class T, class U>
86037e7968Spatrick    concept equality_comparable_with = see below;
87037e7968Spatrick
88037e7968Spatrick  // [concept.totallyordered], concept totally_ordered
89037e7968Spatrick  template<class T>
90037e7968Spatrick    concept totally_ordered = see below;
91037e7968Spatrick  template<class T, class U>
92037e7968Spatrick    concept totally_ordered_with = see below;
93037e7968Spatrick
94037e7968Spatrick  // [concepts.object], object concepts
95037e7968Spatrick  template<class T>
96037e7968Spatrick    concept movable = see below;
97037e7968Spatrick  template<class T>
98037e7968Spatrick    concept copyable = see below;
99037e7968Spatrick  template<class T>
100037e7968Spatrick    concept semiregular = see below;
101037e7968Spatrick  template<class T>
102037e7968Spatrick    concept regular = see below;
103037e7968Spatrick
104037e7968Spatrick  // [concepts.callable], callable concepts
105037e7968Spatrick  // [concept.invocable], concept invocable
106037e7968Spatrick  template<class F, class... Args>
107037e7968Spatrick    concept invocable = see below;
108037e7968Spatrick
109037e7968Spatrick  // [concept.regularinvocable], concept regular_invocable
110037e7968Spatrick  template<class F, class... Args>
111037e7968Spatrick    concept regular_invocable = see below;
112037e7968Spatrick
113037e7968Spatrick  // [concept.predicate], concept predicate
114037e7968Spatrick  template<class F, class... Args>
115037e7968Spatrick    concept predicate = see below;
116037e7968Spatrick
117037e7968Spatrick  // [concept.relation], concept relation
118037e7968Spatrick  template<class R, class T, class U>
119037e7968Spatrick    concept relation = see below;
120037e7968Spatrick
121037e7968Spatrick  // [concept.equiv], concept equivalence_relation
122037e7968Spatrick  template<class R, class T, class U>
123037e7968Spatrick    concept equivalence_relation = see below;
124037e7968Spatrick
125037e7968Spatrick  // [concept.strictweakorder], concept strict_weak_order
126037e7968Spatrick  template<class R, class T, class U>
127037e7968Spatrick    concept strict_weak_order = see below;
128037e7968Spatrick}
129037e7968Spatrick
130037e7968Spatrick*/
131037e7968Spatrick
132*4bdff4beSrobert#include <__assert> // all public C++ headers provide the assertion handler
133*4bdff4beSrobert#include <__concepts/arithmetic.h>
134*4bdff4beSrobert#include <__concepts/assignable.h>
135*4bdff4beSrobert#include <__concepts/boolean_testable.h>
136*4bdff4beSrobert#include <__concepts/class_or_enum.h>
137*4bdff4beSrobert#include <__concepts/common_reference_with.h>
138*4bdff4beSrobert#include <__concepts/common_with.h>
139*4bdff4beSrobert#include <__concepts/constructible.h>
140*4bdff4beSrobert#include <__concepts/convertible_to.h>
141*4bdff4beSrobert#include <__concepts/copyable.h>
142*4bdff4beSrobert#include <__concepts/derived_from.h>
143*4bdff4beSrobert#include <__concepts/destructible.h>
144*4bdff4beSrobert#include <__concepts/different_from.h>
145*4bdff4beSrobert#include <__concepts/equality_comparable.h>
146*4bdff4beSrobert#include <__concepts/invocable.h>
147*4bdff4beSrobert#include <__concepts/movable.h>
148*4bdff4beSrobert#include <__concepts/predicate.h>
149*4bdff4beSrobert#include <__concepts/regular.h>
150*4bdff4beSrobert#include <__concepts/relation.h>
151*4bdff4beSrobert#include <__concepts/same_as.h>
152*4bdff4beSrobert#include <__concepts/semiregular.h>
153*4bdff4beSrobert#include <__concepts/swappable.h>
154*4bdff4beSrobert#include <__concepts/totally_ordered.h>
155037e7968Spatrick#include <__config>
156037e7968Spatrick#include <version>
157037e7968Spatrick
158*4bdff4beSrobert#if _LIBCPP_STD_VER <= 20 && !defined(_LIPCPP_REMOVE_TRANSITIVE_INCLUDES)
159*4bdff4beSrobert#  include <type_traits>
160*4bdff4beSrobert#endif
161*4bdff4beSrobert
162037e7968Spatrick#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
163037e7968Spatrick#  pragma GCC system_header
164037e7968Spatrick#endif
165037e7968Spatrick
166037e7968Spatrick#endif // _LIBCPP_CONCEPTS
167