41 for (
auto it =
begin(); it !=
end(); ++it) {
42 if (it->first == key) {
50 for (
auto it =
begin(); it !=
end(); ++it) {
51 if (it->first == key) {
68 template <
typename Less>
89 template <
typename Less>
134 if (
data.size() < N) {
139 return {
true,
data.end() - 1};
144 return {
false,
end()};
156 if (
data.size() < N) {
161 return {
true,
data.end() - 1};
166 return {
false,
end()};
170 bool insert_if_missing =
true) {
175 }
else if (insert_if_missing) {
183 bool insert_if_missing =
true) {
188 }
else if (insert_if_missing) {
200 return data.back().second;
208 static Value default_value;
209 return default_value;
213 bool allow_rollover =
false)
const {
218 *next_key = it->first;
220 }
else if (allow_rollover && !
empty()) {
221 *next_key =
begin()->first;
229 bool allow_rollover =
false)
const {
234 *prev_key = it->first;
236 }
else if (allow_rollover && !
empty()) {
237 *prev_key =
data[
data.size() - 1].first;
245 constexpr fl::size
size()
const {
return data.size(); }
282template <
typename Key,
typename T,
typename Compare = fl::less<Key>>
286template <
typename Key,
typename T,
typename Compare = fl::less<Key>>
const PairKV * const_iterator
FixedVector< PairKV, N > VectorType
constexpr fl::size size() const
bool update(const Key &key, Value &&value, bool insert_if_missing=true)
const_iterator begin() const
bool update(const Key &key, const Value &value, bool insert_if_missing=true)
fl::pair< Key, Value > PairKV
fl::size erase(const Key &key)
const_iterator lowest(Less less_than=Less()) const
bool prev(const Key &key, Key *prev_key, bool allow_rollover=false) const
VectorType::iterator iterator
iterator lowest(Less less_than=Less())
Value & operator[](const Key &key)
Value get(const Key &key, bool *has=nullptr) const
pair< bool, iterator > insert(const Key &key, const Value &value, insert_result *result=nullptr)
constexpr fl::size capacity() const
iterator highest(Less less_than=Less())
VectorType::const_iterator const_iterator
const_iterator find(const Key &key) const
pair< bool, iterator > insert(Key &&key, Value &&value, insert_result *result=nullptr)
bool contains(const Key &key) const
constexpr bool empty() const
const_iterator end() const
constexpr unsorted_map_fixed() FL_NOEXCEPT=default
bool has(const Key &it) const
iterator find(const Key &key)
bool get(const Key &key, Value *value) const
const_iterator highest(Less less_than=Less()) const
const Value & operator[](const Key &key) const
bool next(const Key &key, Key *next_key, bool allow_rollover=false) const
constexpr remove_reference< T >::type && move(T &&t) FL_NOEXCEPT
constexpr int type_rank< T >::value
MapRedBlackTree< Key, T, Compare, fl::allocator_slab< char > > map
expected< T, E > result
Alias for expected (Rust-style naming)
map< Key, T, Compare > fl_map
Base definition for an LED controller.