Sleipnir C++ API
Loading...
Searching...
No Matches
sleipnir::concepts::AllocatorFor Concept Reference

#include <sleipnir/util/small_vector.hpp>

Concept definition

template<typename A, typename T, typename U T*>
requires(A a, typename std::allocator_traits<A>::template rebind_alloc<U> b,
U xp, typename std::allocator_traits<A>::pointer p,
typename std::allocator_traits<A>::const_pointer cp,
typename std::allocator_traits<A>::void_pointer vp,
typename std::allocator_traits<A>::const_void_pointer cvp,
typename std::allocator_traits<A>::value_type& r,
typename std::allocator_traits<A>::size_type n) {
requires std::random_access_iterator<
typename std::allocator_traits<A>::pointer>;
requires std::contiguous_iterator<
typename std::allocator_traits<A>::pointer>;
requires NullablePointer<
typename std::allocator_traits<A>::const_pointer>;
requires std::random_access_iterator<
typename std::allocator_traits<A>::const_pointer>;
requires std::contiguous_iterator<
typename std::allocator_traits<A>::const_pointer>;
requires std::convertible_to<
typename std::allocator_traits<A>::pointer,
typename std::allocator_traits<A>::const_pointer>;
requires std::convertible_to<
typename std::allocator_traits<A>::pointer,
typename std::allocator_traits<A>::void_pointer>;
requires std::same_as<
typename std::allocator_traits<A>::void_pointer,
typename std::allocator_traits<decltype(b)>::void_pointer>;
requires NullablePointer<
typename std::allocator_traits<A>::const_void_pointer>;
requires std::convertible_to<
typename std::allocator_traits<A>::pointer,
typename std::allocator_traits<A>::const_void_pointer>;
requires std::convertible_to<
typename std::allocator_traits<A>::const_pointer,
typename std::allocator_traits<A>::const_void_pointer>;
requires std::convertible_to<
typename std::allocator_traits<A>::void_pointer,
typename std::allocator_traits<A>::const_void_pointer>;
requires std::same_as<
typename std::allocator_traits<A>::const_void_pointer,
typename std::allocator_traits<decltype(b)>::const_void_pointer>;
typename A::value_type;
requires std::same_as<typename A::value_type, T>;
requires std::same_as<typename A::value_type,
typename std::allocator_traits<A>::value_type>;
requires std::unsigned_integral<
typename std::allocator_traits<A>::size_type>;
requires std::signed_integral<
typename std::allocator_traits<A>::difference_type>;
requires !requires {
typename A::template rebind<U>::other;
} || requires {
requires std::same_as<decltype(b),
typename A::template rebind<U>::other>;
requires std::same_as<A,
typename decltype(b)::template rebind<T>::other>;
};
{ *p } -> std::same_as<typename A::value_type&>;
{ *cp } -> std::same_as<const typename A::value_type&>;
requires std::same_as<decltype(p), typename A::value_type*> || requires {
{ p.operator->() } -> std::same_as<typename A::value_type*>;
};
requires std::same_as<decltype(cp), const typename A::value_type*> ||
requires {
{
cp.operator->()
} -> std::same_as<const typename A::value_type*>;
};
{ static_cast<decltype(p)>(vp) } -> std::same_as<decltype(p)>;
{ static_cast<decltype(cp)>(cvp) } -> std::same_as<decltype(cp)>;
{
std::pointer_traits<decltype(p)>::pointer_to(r)
} -> std::same_as<decltype(p)>;
{ a.allocate(n) } -> std::same_as<decltype(p)>;
requires !requires { a.allocate(n, cvp); } || requires {
{ a.allocate(n, cvp) } -> std::same_as<decltype(p)>;
};
{ a.deallocate(p, n) } -> std::convertible_to<void>;
requires !requires { a.max_size(); } || requires {
{ a.max_size() } -> std::same_as<decltype(n)>;
};
requires !requires { a.construct(xp); } || requires {
{ a.construct(xp) } -> std::convertible_to<void>;
};
requires !requires { a.destroy(xp); } || requires {
{ a.destroy(xp) } -> std::convertible_to<void>;
};
requires NoThrowConstructibleFrom<A, decltype(b)>;
requires NoThrowConstructibleFrom<A, decltype(std::move(b))>;
requires !requires { a.select_on_container_copy_construction(); } ||
requires {
{
a.select_on_container_copy_construction()
} -> std::same_as<A>;
};
requires BoolConstant<typename std::allocator_traits<
requires BoolConstant<typename std::allocator_traits<
requires BoolConstant<
typename std::allocator_traits<A>::propagate_on_container_swap>;
{ a == b } -> std::same_as<bool>;
{ a != b } -> std::same_as<bool>;
} &&
requires(A a1, A a2) {
{ a1 == a2 } -> std::same_as<bool>;
{ a1 != a2 } -> std::same_as<bool>;
}
Definition small_vector.hpp:209
Definition small_vector.hpp:101
Definition small_vector.hpp:191
IntrusiveSharedPtr< T > AllocateIntrusiveShared(Alloc alloc, Args &&... args)
Definition IntrusiveSharedPtr.hpp:275