FixedDeque<T> is a Deque that uses external storage. The storage may be unowned or owned and dynamically allocated. The buffer is allocated during or before construction, and no further allocations occur: the buffer never grows or shrinks.
To statically allocate the buffer, specify the capacity in the FixedDeque declaration or allocate it manually and pass it to the constructor.
Public Member Functions | |
| constexpr | FixedDeque (span< std::byte > unaligned_buffer) noexcept |
| template<size_t kAlignment, size_t kSizeBytes> | |
| constexpr | FixedDeque (containers::Storage< kAlignment, kSizeBytes > &buffer) noexcept |
| FixedDeque (const FixedDeque &)=delete | |
| Copying is not supported since it can fail. | |
| FixedDeque & | operator= (const FixedDeque &)=delete |
| constexpr | FixedDeque (FixedDeque &&other) noexcept |
| constexpr FixedDeque & | operator= (FixedDeque &&other) noexcept |
| void | swap (FixedDeque &other) noexcept |
| template<size_t kInlineCapacity> | |
| void | swap (FixedDeque< T, kInlineCapacity, S > &other) |
| constexpr Deallocator * | deallocator () const |
Public Member Functions inherited from pw::Deque< T, S > | |
| constexpr | Deque (span< std::byte > unaligned_buffer) noexcept |
| constexpr | Deque (containers::Storage< kAlignment, kSizeBytes > &buffer) noexcept |
| Deque (const Deque &)=delete | |
| Copying is not supported since it can fail. | |
| Deque (Deque &&)=delete | |
| Move is not supported to avoid confusion about deque/buffer pairings. | |
| Deque & | operator= (const Deque &)=delete |
| Deque & | operator= (Deque &&)=delete |
| constexpr size_type | max_size () const noexcept |
Static Public Member Functions | |
| static FixedDeque | Allocate (Allocator &allocator, const S capacity) |
| static FixedDeque | TryAllocate (Allocator &allocator, S capacity) |
| static FixedDeque | WithStorage (UniquePtr< std::byte[]> &&storage) |
Additional Inherited Members | |
Public Types inherited from pw::Deque< T, S > | |
| using | const_iterator = containers::internal::DequeIterator< const Derived > |
| using | const_pointer = const value_type * |
| using | const_reference = const value_type & |
| using | difference_type = ptrdiff_t |
| using | iterator = containers::internal::DequeIterator< Derived > |
| using | pointer = value_type * |
| using | reference = value_type & |
| using | size_type = S |
| using | value_type = ValueType |