template<typename T, size_t kInlineCapacity = containers::kExternalStorage, typename S = typename Deque<T>::size_type>
class pw::FixedDeque< T, kInlineCapacity, S >
FixedDeque is a Deque that owns its statically allocated buffer.
This FixedDeque statically allocates its storage buffer internally. Similar to InlineDeque, the capacity is specified as a template parameter. Unlike InlineDeque, FixedDeque is usable as a generic Deque.
If the capacity is omitted (or set to containers::kExternalStorage), the external storage specialization is used. Whether statically or dynamically allocated, the capacity never changes.
- Template Parameters
-
| T | What is stored in the deque. |
| S | Size type. A smaller size type limits the maximum number of items, but requires slightly less memory. |
|
| constexpr | FixedDeque () |
| |
|
| FixedDeque (const FixedDeque &)=delete |
| |
|
FixedDeque & | operator= (const FixedDeque &)=delete |
| |
|
constexpr | FixedDeque (FixedDeque &&other) noexcept |
| |
|
constexpr FixedDeque & | operator= (FixedDeque &&other) noexcept |
| |
| template<size_t kOtherCapacity> |
| | MoveItemsFrom (other) |
| |
|
template<size_t kOtherCapacity> |
| | clear () |
| |
|
this | MoveItemsFrom (other) |
| |
| template<size_t kOtherCapacity> |
| void | swap (FixedDeque< T, kOtherCapacity, S > &other) |
| |
|
constexpr Deallocator * | deallocator () const |
| | Returns nullptr; a FixedDeque with static storage never allocates.
|
| |
| constexpr | Deque (span< std::byte > unaligned_buffer) noexcept |
| |
| template<size_t kAlignment, size_t kSizeBytes> |
| constexpr | Deque (containers::Storage< kAlignment, kSizeBytes > &buffer) noexcept |
| |
|
| Deque (const Deque &)=delete |
| | Copying is not supported since it can fail.
|
| |
|
Deque & | operator= (const Deque &)=delete |
| |
|
| Deque (Deque &&)=delete |
| | Move is not supported to avoid confusion about deque/buffer pairings.
|
| |
|
Deque & | operator= (Deque &&)=delete |
| |
|
constexpr size_type | max_size () const noexcept |
| |