|
constexpr | flat_set () |
|
constexpr | flat_set (Compare const &comp) |
|
constexpr | flat_set (container_type const &container) |
| Initializes c with etl::move(cont), value-initializes compare, sorts the range [begin(),end()) with respect to compare, and finally erases the range [ranges::unique(*this, compare), end());.
|
|
constexpr | flat_set (etl::sorted_unique_t, container_type cont) |
|
template<typename InputIt> |
constexpr | flat_set (etl::sorted_unique_t, InputIt first, InputIt last, Compare const &comp=Compare()) |
|
template<typename InputIt> |
constexpr | flat_set (InputIt first, InputIt last, Compare const &comp=Compare()) |
|
constexpr auto | begin () const noexcept -> const_iterator |
|
constexpr auto | begin () noexcept -> iterator |
|
constexpr auto | cbegin () const noexcept -> const_iterator |
|
constexpr auto | cend () const noexcept -> const_iterator |
|
constexpr auto | clear () noexcept -> void |
|
template<typename K>
requires etl::detail::is_transparent_v<Compare> |
constexpr auto | contains (K const &key) const -> bool |
|
constexpr auto | contains (key_type const &key) const -> bool |
|
template<typename K>
requires etl::detail::is_transparent_v<Compare> |
constexpr auto | count (K const &key) const -> size_type |
|
constexpr auto | count (key_type const &key) const -> size_type |
|
constexpr auto | crbegin () const noexcept -> const_reverse_iterator |
|
constexpr auto | crend () const noexcept -> const_reverse_iterator |
|
template<typename... Args> |
constexpr auto | emplace (Args &&... args) -> etl::pair< iterator, bool > |
|
template<typename... Args> |
constexpr auto | emplace_hint (const_iterator, Args &&... args) -> iterator |
|
constexpr auto | empty () const noexcept -> bool |
| Returns true if the underlying container is empty.
|
|
constexpr auto | end () const noexcept -> const_iterator |
|
constexpr auto | end () noexcept -> iterator |
|
template<typename K>
requires etl::detail::is_transparent_v<Compare> |
constexpr auto | equal_range (K const &key) -> etl::pair< iterator, iterator > |
|
template<typename K>
requires etl::detail::is_transparent_v<Compare> |
constexpr auto | equal_range (K const &key) const -> etl::pair< const_iterator, const_iterator > |
|
constexpr auto | equal_range (key_type const &key) -> etl::pair< iterator, iterator > |
|
constexpr auto | equal_range (key_type const &key) const -> etl::pair< const_iterator, const_iterator > |
|
constexpr auto | erase (const_iterator first, const_iterator last) -> iterator |
|
constexpr auto | erase (const_iterator position) -> iterator |
|
constexpr auto | erase (iterator position) -> iterator |
|
constexpr auto | erase (key_type const &key) -> size_type |
|
constexpr auto | extract () &&-> container_type |
|
template<typename K>
requires etl::detail::is_transparent_v<Compare> |
constexpr auto | find (K const &key) -> iterator |
|
template<typename K>
requires etl::detail::is_transparent_v<Compare> |
constexpr auto | find (K const &key) const -> const_iterator |
|
constexpr auto | find (key_type const &key) -> iterator |
|
constexpr auto | find (key_type const &key) const -> const_iterator |
|
constexpr auto | insert (const_iterator position, value_type &&x) -> iterator |
|
constexpr auto | insert (const_iterator position, value_type const &x) -> iterator |
|
template<typename InputIt> |
constexpr auto | insert (etl::sorted_unique_t, InputIt first, InputIt last) -> void |
|
template<typename InputIt> |
constexpr auto | insert (InputIt first, InputIt last) -> void |
|
constexpr auto | insert (value_type &&x) -> etl::pair< iterator, bool > |
|
constexpr auto | insert (value_type const &x) -> etl::pair< iterator, bool > |
|
constexpr auto | key_comp () const -> key_compare |
|
template<typename K>
requires etl::detail::is_transparent_v<Compare> |
constexpr auto | lower_bound (K const &key) -> iterator |
|
template<typename K>
requires etl::detail::is_transparent_v<Compare> |
constexpr auto | lower_bound (K const &key) const -> const_iterator |
|
constexpr auto | lower_bound (key_type const &key) -> iterator |
|
constexpr auto | lower_bound (key_type const &key) const -> const_iterator |
|
constexpr auto | max_size () const noexcept -> size_type |
| Returns the max_size of the underlying container.
|
|
constexpr auto | rbegin () const noexcept -> const_reverse_iterator |
|
constexpr auto | rbegin () noexcept -> reverse_iterator |
|
constexpr auto | rend () const noexcept -> const_reverse_iterator |
|
constexpr auto | rend () noexcept -> reverse_iterator |
|
constexpr auto | replace (container_type &&container) -> void |
|
constexpr auto | size () const noexcept -> size_type |
| Returns the size of the underlying container.
|
|
constexpr auto | swap (flat_set &other) noexcept(etl::is_nothrow_swappable_v< Container > &&etl::is_nothrow_swappable_v< Compare >) -> void |
|
template<typename K>
requires etl::detail::is_transparent_v<Compare> |
constexpr auto | upper_bound (K const &key) -> iterator |
|
template<typename K>
requires etl::detail::is_transparent_v<Compare> |
constexpr auto | upper_bound (K const &key) const -> const_iterator |
|
constexpr auto | upper_bound (key_type const &key) -> iterator |
|
constexpr auto | upper_bound (key_type const &key) const -> const_iterator |
|
constexpr auto | value_comp () const -> value_compare |
|
template<typename Key, typename Container, typename Compare = etl::less<Key>>
struct etl::flat_set< Key, Container, Compare >
A flat_set is a container adaptor that provides an associative container interface that supports unique keys (contains at most one of each key value) and provides for fast retrieval of the keys themselves. flat_set supports random access iterators. Any sequence container supporting random access iteration can be used to instantiate flat_set.
A flat_set satisfies all of the requirements of a container and of a reversible container. flat_set satisfies the requirements of an associative container, except that:
- it does not meet the requirements related to node handles,
- it does not meet the requirements related to iterator invalidation, and
- the time complexity of the insert, emplace, emplace_hint, and erase members that respectively insert, emplace or erase a single element from the set is linear, including the ones that take an insertion position iterator.
- https://isocpp.org/files/papers/P1222R1.pdf
- https://youtu.be/b9ZYM0d6htg