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

Overview

template<typename T, size_t kInlineCapacity = containers::kExternalStorage, typename S = std::conditional_t< containers::internal::kPodType<T>, typename containers::internal::PodDeque<T>::size_type, 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
TWhat is stored in the deque.
SSize type. A smaller size type limits the maximum number of items, but requires slightly less memory.
Inheritance diagram for pw::FixedDeque< T, kInlineCapacity, S >:
pw::containers::StorageBase< kAlignment, kSizeBytes >

Public Types

using Base = std::conditional_t< containers::internal::kPodType< T >, containers::internal::PodDeque< T, S >, Deque< T, S > >
 

Public Member Functions

constexpr FixedDeque ()
 
 FixedDeque (const FixedDeque &)=delete
 
FixedDequeoperator= (const FixedDeque &)=delete
 
constexpr FixedDeque (FixedDeque &&other) noexcept
 
constexpr FixedDequeoperator= (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 Deallocatordeallocator () const
 Returns nullptr; a FixedDeque with static storage never allocates.
 

Public Attributes

return * this
 

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