15template <
typename Key,
typename Hash = Hash<Key>,
16 typename KeyEqual = EqualTo<Key>>
89 return data.insert(key,
true).second;
98 template<
typename... Args>
106 auto map_it =
data.find(key);
111 auto map_it =
data.find(key);
117 return has(key) ? 1 : 0;
122 return data.erase(key);
150 bool has(
const Key &key)
const {
return data.contains(key); }
155 if (
size() != other.
size())
return false;
156 for (
const auto& key : *
this) {
157 if (!other.
has(key))
return false;
164 return !(*
this == other);
Polymorphic memory resource base class (PMR-style).
bool operator!=(const const_iterator &other) const
const_iterator operator++(int)
typename fl::unordered_map< Key, bool, Hash, KeyEqual >::const_iterator map_const_iterator
reference operator*() const
fl::forward_iterator_tag iterator_category
const_iterator & operator++()
pointer operator->() const
const_iterator(const iterator &other)
bool operator==(const const_iterator &other) const
const_iterator() FL_NOEXCEPT=default
pointer operator->() const
reference operator*() const
typename fl::unordered_map< Key, bool, Hash, KeyEqual >::iterator map_iterator
bool operator==(const iterator &other) const
iterator() FL_NOEXCEPT=default
fl::forward_iterator_tag iterator_category
friend class unordered_set
bool operator!=(const iterator &other) const
bool contains(const Key &key) const
fl::unordered_map< Key, bool, Hash, KeyEqual > data
const_iterator cbegin() const
const_iterator find(const Key &key) const
unordered_set(const unordered_set &other) FL_NOEXCEPT=default
unordered_set & operator=(unordered_set &&other) FL_NOEXCEPT=default
~unordered_set() FL_NOEXCEPT=default
bool emplace(Args &&... args)
bool has(const Key &key) const
bool operator==(const unordered_set &other) const
Equality comparison (set equality: same elements, order-independent)
bool operator!=(const unordered_set &other) const
Inequality comparison.
memory_resource * get_memory_resource() const
iterator find(const Key &key)
fl::size count(const Key &key) const
unordered_set & operator=(const unordered_set &other) FL_NOEXCEPT=default
unordered_set() FL_NOEXCEPT=default
const_iterator end() const
iterator erase(const_iterator pos)
const_iterator begin() const
fl::size capacity() const
unordered_set(unordered_set &&other) FL_NOEXCEPT=default
bool erase(const Key &key)
bool insert(const Key &key)
const_iterator cend() const
iterator erase(iterator pos)
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
Base definition for an LED controller.