C/C++ API Reference
Loading...
Searching...
No Matches
pw::FixedDeque< T, containers::kExternalStorage, S > Class Template Referencefinal

Overview

template<typename T, typename S>
class pw::FixedDeque< T, containers::kExternalStorage, S >

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.

Inheritance diagram for pw::FixedDeque< T, containers::kExternalStorage, S >:
pw::Deque< T, S >

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.
 
FixedDequeoperator= (const FixedDeque &)=delete
 
constexpr FixedDeque (FixedDeque &&other) noexcept
 
constexpr FixedDequeoperator= (FixedDeque &&other) noexcept
 
void swap (FixedDeque &other) noexcept
 
template<size_t kInlineCapacity>
void swap (FixedDeque< T, kInlineCapacity, S > &other)
 
constexpr Deallocatordeallocator () 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.
 
Dequeoperator= (const Deque &)=delete
 
Dequeoperator= (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
 

The documentation for this class was generated from the following file: