17 #include <type_traits> 58 template <
typename value_t,
size_t alignment_v = __STDCPP_DEFAULT_NEW_ALIGNMENT__>
88 template <
class other_value_type>
106 #if defined(__APPLE__) && (!defined(_GLIBCXX_HAVE_ALIGNED_ALLOC) && !defined(_ISOC11_SOURCE)) 108 if (
int res = posix_memalign(&p,
alignment, n *
sizeof(
value_type)); res == 0 && p !=
nullptr)
109 return static_cast<pointer>(p);
148 template<
typename new_value_type>
158 template <
class value_type2,
size_t alignment2>
166 template <
class value_type2,
size_t alignment2>
aligned_allocator & operator=(aligned_allocator const &)=default
Defaulted.
constexpr bool operator==(aligned_allocator< value_type2, alignment2 > const &) noexcept
Returns true if the memory-alignment matches.
Definition: aligned_allocator.hpp:160
The main SeqAn3 namespace.
void deallocate(pointer p, size_type) noexcept
Deallocates the storage referenced by the pointer p, which must be a pointer obtained by an earlier c...
Definition: aligned_allocator.hpp:139
static constexpr size_t alignment
The memory-alignment of the allocation.
Definition: aligned_allocator.hpp:63
constexpr bool operator!=(aligned_allocator< value_type2, alignment2 > const &) noexcept
Returns false if the memory-alignment mismatches.
Definition: aligned_allocator.hpp:167
typename std::pointer_traits< pointer >::difference_type difference_type
The difference type of the allocation.
Definition: aligned_allocator.hpp:70
The aligned_allocator member template class aligned_allocator::rebind provides a way to obtain an all...
Definition: aligned_allocator.hpp:149
pointer allocate(size_type n)
Allocates n * sizeof(T) bytes of uninitialized storage by calling std::aligned_alloc, but it is unspecified when and how this function is called.
Definition: aligned_allocator.hpp:99
value_t value_type
The value type of the allocation.
Definition: aligned_allocator.hpp:66
Allocates uninitialized storage whose memory-alignment is specified by alignment. ...
Definition: aligned_allocator.hpp:59
constexpr aligned_allocator(aligned_allocator< other_value_type, alignment > const &) noexcept
Copy constructor with different value type.
Definition: aligned_allocator.hpp:89
~aligned_allocator()=default
Defaulted.
T aligned_alloc(T... args)
value_type * pointer
The pointer type of the allocation.
Definition: aligned_allocator.hpp:68
aligned_allocator()=default
Defaulted.