16template <
typename Key,
typename Allocator>
class set;
20template <
typename Key,
typename Allocator>
class VectorSet;
22template <
typename Key, size N>
45 for (
auto it =
begin(); it !=
end(); ++it) {
54 for (
auto it =
begin(); it !=
end(); ++it) {
63 if (
data.size() < N) {
75 if (
data.size() < N) {
86 template<
typename... Args>
88 if (
data.size() < N) {
91 auto it =
find(temp_key);
118 bool allow_rollover =
false)
const {
125 }
else if (allow_rollover && !
empty()) {
126 *next_key = *
begin();
134 bool allow_rollover =
false)
const {
141 }
else if (allow_rollover && !
empty()) {
150 constexpr fl::size
size()
const {
return data.size(); }
172template <
typename Key,
typename Allocator = fl::allocator<Key>>
class VectorSet {
187 for (
auto it =
begin(); it !=
end(); ++it) {
196 for (
auto it =
begin(); it !=
end(); ++it) {
224 template<
typename... Args>
228 auto it =
find(temp_key);
254 constexpr fl::size
size()
const {
return data.size(); }
278template <
typename Key,
typename Allocator = fl::allocator_slab<Key>>
class set {
320 return tree_.insert(key);
327 template<
typename... Args>
337 return tree_.erase(key);
346 return tree_.count(key);
350 return tree_.find(key);
354 return tree_.contains(key);
362 return tree_.equal_range(key);
366 return tree_.lower_bound(key);
370 return tree_.upper_bound(key);
376template <
typename T, fl::size N>
const Key * const_iterator
const Key * const_iterator
typename TreeType::const_iterator const_iterator
VectorType::iterator iterator
constexpr VectorSet()=default
constexpr bool empty() const
const_iterator end() const
constexpr fl::size size() const
bool insert(const Key &key)
const_iterator find(const Key &key) const
bool has(const Key &key) const
VectorType::const_iterator const_iterator
iterator find(const Key &key)
const Key & front() const
fl::HeapVector< Key, Allocator > VectorType
bool emplace(Args &&... args)
const_iterator begin() const
constexpr fl::size capacity() const
bool erase(const Key &key)
constexpr fl::size capacity() const
VectorType::iterator iterator
const_iterator find(const Key &key) const
bool erase(const Key &key)
constexpr fl::size size() const
constexpr bool empty() const
VectorType::const_iterator const_iterator
bool next(const Key &key, Key *next_key, bool allow_rollover=false) const
FixedVector< Key, N > VectorType
const_iterator begin() const
bool prev(const Key &key, Key *prev_key, bool allow_rollover=false) const
bool emplace(Args &&... args)
const_iterator end() const
bool insert(const Key &key)
const Key & front() const
bool has(const Key &key) const
iterator find(const Key &key)
constexpr VectorSetFixed()=default
size_type max_size() const
ptrdiff_t difference_type
set(const set &other)=default
fl::pair< const_iterator, bool > insert(Key &&key)
const_iterator begin() const
bool has(const Key &key) const
fl::pair< const_iterator, bool > insert(const Key &key)
const Key & const_reference
bool contains(const Key &key) const
const_iterator cbegin() const
fl::pair< const_iterator, bool > emplace(Args &&... args)
typename TreeType::const_iterator const_iterator
fl::pair< const_iterator, const_iterator > equal_range(const Key &key) const
const_iterator find(const Key &key) const
size_type count(const Key &key) const
const_iterator lower_bound(const Key &key) const
const_iterator erase(const_iterator pos)
set & operator=(set &&other)=default
const Key * const_pointer
const_iterator cend() const
const_iterator end() const
set & operator=(const set &other)=default
const_iterator upper_bound(const Key &key) const
fl::SetRedBlackTree< Key, fl::less< Key >, Allocator > TreeType
size_type erase(const Key &key)
Implements the FastLED namespace macros.
constexpr remove_reference< T >::type && move(T &&t) noexcept
fl::set< T, fl::allocator_inlined_slab< T, N > > set_inlined
__PTRDIFF_TYPE__ ptrdiff_t
VectorSetFixed< Key, N > FixedSet
constexpr T && forward(typename remove_reference< T >::type &t) noexcept