16template <
typename Key,
size_t N>
class FixedSet {
31 for (
auto it =
begin(); it !=
end(); ++it) {
40 for (
auto it =
begin(); it !=
end(); ++it) {
49 if (
data.size() < N) {
77 bool allow_rollover =
false)
const {
84 }
else if (allow_rollover && !
empty()) {
93 bool allow_rollover =
false)
const {
100 }
else if (allow_rollover && !
empty()) {
109 constexpr size_t size()
const {
return data.size(); }
iterator find(const Key &key)
constexpr size_t size() const
bool next(const Key &key, Key *next_key, bool allow_rollover=false) const
bool has(const Key &key) const
const_iterator find(const Key &key) const
bool insert(const Key &key)
const_iterator end() const
constexpr FixedSet()=default
const Key & front() const
bool erase(const Key &key)
bool prev(const Key &key, Key *prev_key, bool allow_rollover=false) const
FixedVector< Key, N > VectorType
const_iterator begin() const
VectorType::const_iterator const_iterator
constexpr size_t capacity() const
constexpr bool empty() const
VectorType::iterator iterator
const Key * const_iterator
Implements the FastLED namespace macros.
Implements a simple red square effect for 2D LED grids.