11namespace templa::concepts
23 { std::hash<T>{}(x) } -> std::convertible_to<std::size_t>;
44 template <
typename F,
typename... T>
46 { f(std::forward<T>(t)...) };
106 template <
typename T>
119 template <
typename T>
132 template <
typename T>
145 template <
typename T>
155 template <
typename T>
179 template <
class E,
class T,
class A>
181 requires std::same_as<typename T::allocator_type, typename std::allocator_traits<A>::rebind_alloc<E>>;
182 std::allocator_traits<A>::destroy(m, p);
192 { a.get_allocator() } -> std::same_as<typename T::allocator_type>;
207 template <
class C,
class T,
class A>
229 template <
class E,
class T>
246 requires std::regular<T>;
247 requires std::swappable<T>;
249 requires std::same_as<typename T::reference, typename T::value_type &>;
250 requires std::same_as<typename T::const_reference, const typename T::value_type &>;
251 requires std::forward_iterator<typename T::iterator>;
252 requires std::forward_iterator<typename T::const_iterator>;
253 requires std::signed_integral<typename T::difference_type>;
254 requires std::same_as<typename T::difference_type, typename std::iterator_traits<typename T::iterator>::difference_type>;
255 requires std::same_as<typename T::difference_type, typename std::iterator_traits<typename T::const_iterator>::difference_type>;
256 { a.begin() } -> std::same_as<typename T::iterator>;
257 { a.end() } -> std::same_as<typename T::iterator>;
258 { b.begin() } -> std::same_as<typename T::const_iterator>;
259 { b.end() } -> std::same_as<typename T::const_iterator>;
260 { a.cbegin() } -> std::same_as<typename T::const_iterator>;
261 { a.cend() } -> std::same_as<typename T::const_iterator>;
262 { a.size() } -> std::same_as<typename T::size_type>;
263 { a.max_size() } -> std::same_as<typename T::size_type>;
264 { a.empty() } -> std::convertible_to<bool>;
285 template <
class T,
template <
typename...>
class Template>
287 []<
typename... Args>(Template<Args...>
const &)
305 template <
bool... Cs>
constexpr bool is_basic_string_v
Variable template shortcut for is_basic_string.
Definition concepts.hpp:216
Concept to check if a type supports addition operations.
Definition concepts.hpp:94
Concept checking if a type has a get_allocator() method returning allocator_type.
Definition concepts.hpp:191
Concept checking if an object can be destroyed via an allocator.
Definition concepts.hpp:180
Concept to check if a type supports all basic arithmetic operations.
Definition concepts.hpp:146
Concept to check if a callable can be invoked with given argument types.
Definition concepts.hpp:45
Concept to check if a type supports common comparison operators.
Definition concepts.hpp:57
Concept that models an STL-like container.
Definition concepts.hpp:245
Concept checking if an object can be destroyed via std::destroy_at.
Definition concepts.hpp:166
Concept to check if a type supports division operations.
Definition concepts.hpp:133
Concept to check if a container supports erasing of elements.
Definition concepts.hpp:230
Concept to check if a type is hashable via std::hash.
Definition concepts.hpp:22
Concept to check if a type is an integral type.
Definition concepts.hpp:34
Concept to check if a type supports multiplication operations.
Definition concepts.hpp:120
Concept to check if a type is a signed integral type.
Definition concepts.hpp:84
Concept to check if a type can be streamed to an std::ostream.
Definition concepts.hpp:156
Concept to check if a type supports subtraction operations.
Definition concepts.hpp:107
Concept to check if a type is an unsigned integral type.
Definition concepts.hpp:74
Checks whether a given type T is a specialization of the class template Template.
Definition concepts.hpp:286
Concept satisfied only if all boolean conditions are true.
Definition concepts.hpp:306
Helper struct to detect if a type is std::basic_string.
Definition concepts.hpp:204