13#include "platforms/assert_defs.h"
30template <
typename Key,
typename Value,
201 if (
this != &other) {
219 if (
this != &other) {
249 if (idx !=
npos())
return mData[idx].second;
253 FASTLED_ASSERT(idx !=
npos(),
"unordered_map_small::operator[]: insert failed");
254 return mData[idx].second;
259 FASTLED_ASSERT(idx !=
npos(),
"Key not found in unordered_map_small");
260 return mData[idx].second;
265 FASTLED_ASSERT(idx !=
npos(),
"Key not found in unordered_map_small");
266 return mData[idx].second;
333 template <
typename... Args>
374 mData.swap(other.mData);
401 while (
mData.size() > write)
mData.pop_back();
413 return idx !=
npos() ?
mData[idx].second : defaultValue;
419 *out_value =
mData[idx].second;
457 if (
mSize != other.mSize)
return false;
461 if (oidx ==
npos() || !(other.mData[oidx].second ==
mData[i].second)) {
469 return !(*
this == other);
473template <
typename Key,
typename Value,
typename Equal>
A dynamic bitset implementation that can be resized at runtime.
Polymorphic memory resource base class (PMR-style).
void compact() FL_NOEXCEPT
bool insert(Key &&key, Value &&value, insert_result *result=nullptr) FL_NOEXCEPT
const Value & at(const Key &key) const FL_NOEXCEPT
unordered_map_small(unordered_map_small &&other) FL_NOEXCEPT
bool contains(const Key &key) const FL_NOEXCEPT
size_type capacity() const FL_NOEXCEPT
unordered_map_small()=default
fl::pair< iterator, bool > emplace(Args &&... args) FL_NOEXCEPT
bool has(const Key &key) const FL_NOEXCEPT
bool get(const Key &key, Value *out_value) const FL_NOEXCEPT
iterator begin() FL_NOEXCEPT
size_type do_insert(value_type &&kv) FL_NOEXCEPT
iterator erase(iterator pos) FL_NOEXCEPT
bool update(const Key &key, const Value &value) FL_NOEXCEPT
const_iterator find(const Key &key) const FL_NOEXCEPT
size_type count(const Key &key) const FL_NOEXCEPT
size_type do_insert(const value_type &kv) FL_NOEXCEPT
void swap(unordered_map_small &other) FL_NOEXCEPT
const_iterator cend() const FL_NOEXCEPT
unordered_map_small(const unordered_map_small &other) FL_NOEXCEPT
unordered_map_small(const Equal &eq, memory_resource *resource=nullptr) FL_NOEXCEPT
void place_at(size_type idx, value_type &&kv) FL_NOEXCEPT
memory_resource * get_memory_resource() const FL_NOEXCEPT
Value & at(const Key &key) FL_NOEXCEPT
unordered_map_small & operator=(unordered_map_small &&other) FL_NOEXCEPT
unordered_map_small(memory_resource *resource) FL_NOEXCEPT
size_type append(const value_type &kv) FL_NOEXCEPT
void reserve(size_type n) FL_NOEXCEPT
size_type erase(const Key &key) FL_NOEXCEPT
const_iterator end() const FL_NOEXCEPT
bool empty() const FL_NOEXCEPT
iterator erase(const_iterator pos) FL_NOEXCEPT
Value & operator[](const Key &key) FL_NOEXCEPT
memory_resource * mResource
bool update(const Key &key, Value &&value) FL_NOEXCEPT
fl::pair< iterator, bool > insert(value_type &&kv) FL_NOEXCEPT
static size_type npos() FL_NOEXCEPT
size_type max_size() const FL_NOEXCEPT
fl::pair< iterator, bool > insert(const value_type &kv) FL_NOEXCEPT
bool operator!=(const unordered_map_small &other) const FL_NOEXCEPT
bool operator==(const unordered_map_small &other) const FL_NOEXCEPT
iterator find(const Key &key) FL_NOEXCEPT
fl::pair< iterator, bool > insert_or_update(const Key &key, const Value &value) FL_NOEXCEPT
fl::pair< Key, Value > value_type
const_iterator cbegin() const FL_NOEXCEPT
fl::vector< value_type > vector_type
void place_at(size_type idx, const value_type &kv) FL_NOEXCEPT
iterator end() FL_NOEXCEPT
key_equal key_eq() const FL_NOEXCEPT
unordered_map_small & operator=(const unordered_map_small &other) FL_NOEXCEPT
size_type size() const FL_NOEXCEPT
size_type find_free_slot() const FL_NOEXCEPT
Value get(const Key &key, const Value &defaultValue) const FL_NOEXCEPT
const_iterator begin() const FL_NOEXCEPT
size_type find_index(const Key &key) const FL_NOEXCEPT
size_type append(value_type &&kv) FL_NOEXCEPT
bool insert(const Key &key, const Value &value, insert_result *result=nullptr) FL_NOEXCEPT
PMR-style polymorphic memory resource for type-erased allocation.
constexpr T && forward(typename remove_reference< T >::type &t) FL_NOEXCEPT
constexpr remove_reference< T >::type && move(T &&t) FL_NOEXCEPT
void swap(T &a, T &b) FL_NOEXCEPT
constexpr int type_rank< T >::value
MapRedBlackTree< Key, T, Compare, fl::allocator_slab< char > > map
memory_resource * default_memory_resource() FL_NOEXCEPT
Get the default memory resource (wraps fl::Malloc / fl::Free / fl::realloc).
void swap(array< T, N > &lhs, array< T, N > &rhs) FL_NOEXCEPT
expected< T, E > result
Alias for expected (Rust-style naming)
Base definition for an LED controller.
bool operator()(const T &a, const T &b) const FL_NOEXCEPT
reference operator*() const FL_NOEXCEPT
const_iterator operator++(int) FL_NOEXCEPT
const_iterator(const unordered_map_small *map, size_type idx) FL_NOEXCEPT
const value_type & reference
const value_type * pointer
friend class unordered_map_small
bool operator==(const const_iterator &o) const FL_NOEXCEPT
const_iterator & operator++() FL_NOEXCEPT
bool operator!=(const const_iterator &o) const FL_NOEXCEPT
fl::forward_iterator_tag iterator_category
pointer operator->() const FL_NOEXCEPT
const_iterator(const iterator &it) FL_NOEXCEPT
const_iterator() FL_NOEXCEPT
const unordered_map_small * mMap
void advance_to_occupied() FL_NOEXCEPT
bool operator==(const iterator &o) const FL_NOEXCEPT
iterator & operator++() FL_NOEXCEPT
bool operator!=(const iterator &o) const FL_NOEXCEPT
iterator(unordered_map_small *map, size_type idx) FL_NOEXCEPT
reference operator*() const FL_NOEXCEPT
friend class unordered_map_small
fl::forward_iterator_tag iterator_category
pointer operator->() const FL_NOEXCEPT
iterator operator++(int) FL_NOEXCEPT
unordered_map_small * mMap
void advance_to_occupied() FL_NOEXCEPT