FastLED 3.9.15
Loading...
Searching...
No Matches
fl::allocator_inlined< T, N, BaseAllocator > Class Template Reference

Detailed Description

template<typename T, fl::size N, typename BaseAllocator = fl::allocator<T>>
class fl::allocator_inlined< T, N, BaseAllocator >

Definition at line 805 of file allocator.h.

#include <allocator.h>

+ Inheritance diagram for fl::allocator_inlined< T, N, BaseAllocator >:
+ Collaboration diagram for fl::allocator_inlined< T, N, BaseAllocator >:

Classes

struct  InlinedStorage
 
struct  rebind
 

Public Types

using const_pointer = const T*
 
using const_reference = const T&
 
using difference_type = fl::ptrdiff_t
 
using pointer = T*
 
using reference = T&
 
using size_type = fl::size
 
using value_type = T
 

Public Member Functions

 allocator_inlined () FL_NOEXCEPT=default
 
 allocator_inlined (const allocator_inlined &other) FL_NOEXCEPT
 
template<typename U>
 allocator_inlined (const allocator_inlined< U, N, typename BaseAllocator::template rebind< U >::other > &other) FL_NOEXCEPT
 
 ~allocator_inlined () FL_NOEXCEPT
 
T * allocate (fl::size n) FL_NOEXCEPT
 
void clear () FL_NOEXCEPT
 
template<typename U, typename... Args>
void construct (U *p, Args &&... args) FL_NOEXCEPT
 
void deallocate (T *p, fl::size n) FL_NOEXCEPT
 
template<typename U>
void destroy (U *p) FL_NOEXCEPT
 
fl::size inlined_capacity () const FL_NOEXCEPT
 
bool is_using_inlined () const FL_NOEXCEPT
 
allocator_inlinedoperator= (const allocator_inlined &other) FL_NOEXCEPT
 
fl::size total_size () const FL_NOEXCEPT
 

Private Types

using has_cleanup = decltype(has_cleanup_impl<BaseAllocator>(0))
 

Private Member Functions

void cleanup_base_allocator () FL_NOEXCEPT
 
void cleanup_base_allocator_impl (fl::false_type) FL_NOEXCEPT
 
void cleanup_base_allocator_impl (fl::true_type) FL_NOEXCEPT
 
const T * get_inlined_ptr () const FL_NOEXCEPT
 
T * get_inlined_ptr () FL_NOEXCEPT
 
bool operator!= (const allocator_inlined &other) const FL_NOEXCEPT
 
bool operator== (const allocator_inlined &other) const FL_NOEXCEPT
 

Static Private Member Functions

template<typename U>
static fl::false_type has_cleanup_impl (...) FL_NOEXCEPT
 
template<typename U>
static auto has_cleanup_impl (int) FL_NOEXCEPT -> decltype(fl::declval< U >().cleanup(), fl::true_type{})
 

Private Attributes

fl::size mActiveAllocations = 0
 
BaseAllocator mBaseAllocator
 
fl::bitset_fixed< N > mFreeBits
 
InlinedStorage mInlinedStorage
 
fl::size mInlinedUsed = 0
 

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