tetl 0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
static_set< Key, Capacity, Compare > Struct Template Reference

static_set is an associative container that contains a sorted set of unique objects of type Key. Sorting is done using the key comparison function Compare. More...

#include <etl/set.hpp>

Public Types

using const_iterator = typename storage_type::const_pointer
 
using const_pointer = typename storage_type::const_pointer
 
using const_reference = value_type const &
 
using const_reverse_iterator = etl::reverse_iterator< const_iterator >
 
using difference_type = ptrdiff_t
 
using iterator = typename storage_type::pointer
 
using key_compare = Compare
 
using key_type = typename storage_type::value_type
 
using pointer = typename storage_type::pointer
 
using reference = value_type &
 
using reverse_iterator = etl::reverse_iterator< iterator >
 
using size_type = size_t
 
using value_compare = Compare
 
using value_type = typename storage_type::value_type
 

Public Member Functions

constexpr static_set ()=default
 Constructs empty container.
 
template<typename InputIt >
requires (detail::InputIterator<InputIt>)
constexpr static_set (InputIt first, InputIt last)
 Constructs with the contents of the range [first, last). If multiple elements in the range have keys that compare equivalent, all but the first will be discarded.
 
constexpr static_set (static_set &&other) noexcept(noexcept(etl::move(declval< storage_type >())))=default
 
constexpr static_set (static_set const &other)=default
 
constexpr auto begin () const noexcept -> const_iterator
 Returns an iterator to the first element of the set.
 
constexpr auto begin () noexcept -> iterator
 Returns an iterator to the first element of the set.
 
constexpr auto cbegin () const noexcept -> const_iterator
 Returns an iterator to the first element of the set.
 
constexpr auto cend () const noexcept -> const_iterator
 Returns an iterator to the element following the last element of the set.
 
constexpr auto clear () noexcept -> void
 Erases all elements from the container. After this call, size() returns zero.
 
template<typename K >
requires (detail::is_transparent_v<key_compare>)
constexpr auto contains (K const &x) const -> bool
 Checks if there is an element with key that compares equivalent to the value x.
 
constexpr auto contains (key_type const &key) const noexcept -> bool
 Checks if there is an element with key equivalent to key in the container.
 
template<typename K >
requires (detail::is_transparent_v<key_compare>)
constexpr auto count (K const &x) const -> size_type
 Returns the number of elements with key that compares equivalent to the value x.
 
constexpr auto count (key_type const &key) const noexcept -> size_type
 Returns the number of elements with key that compares equivalent to the specified argument, which is either 1 or 0 since this container does not allow duplicates.
 
constexpr auto crbegin () const noexcept -> const_reverse_iterator
 Returns a reverse iterator to the first element of the reversed set. It corresponds to the last element of the non-reversed set.
 
constexpr auto crend () const noexcept -> const_reverse_iterator
 Returns a reverse iterator to the element following the last element of the reversed set. It corresponds to the element preceding the first element of the non-reversed set.
 
template<typename... Args>
requires (is_copy_constructible_v<key_type>)
constexpr auto emplace (Args &&... args) noexcept(noexcept(insert(declval< key_type >()))) -> pair< iterator, bool >
 Inserts a new element into the container constructed in-place with the given args if there is no element with the key in the container.
 
constexpr auto empty () const noexcept -> bool
 Checks if the container has no elements, i.e. whether begin() == end().
 
constexpr auto end () const noexcept -> const_iterator
 Returns an iterator to the element following the last element of the set.
 
constexpr auto end () noexcept -> iterator
 Returns an iterator to the element following the last element of the set.
 
template<typename K >
requires (detail::is_transparent_v<key_compare>)
constexpr auto equal_range (K const &key) -> iterator
 Returns a range containing all elements with the given key in the container. The range is defined by two iterators, one pointing to the first element that is not less than key and another pointing to the first element greater than key. Alternatively, the first iterator may be obtained with lower_bound(), and the second with upper_bound().
 
template<typename K >
requires (detail::is_transparent_v<key_compare>)
constexpr auto equal_range (K const &key) const -> const_iterator
 Returns a range containing all elements with the given key in the container. The range is defined by two iterators, one pointing to the first element that is not less than key and another pointing to the first element greater than key. Alternatively, the first iterator may be obtained with lower_bound(), and the second with upper_bound().
 
constexpr auto equal_range (key_type const &key) -> iterator
 Returns a range containing all elements with the given key in the container. The range is defined by two iterators, one pointing to the first element that is not less than key and another pointing to the first element greater than key. Alternatively, the first iterator may be obtained with lower_bound(), and the second with upper_bound().
 
constexpr auto equal_range (key_type const &key) const -> const_iterator
 Returns a range containing all elements with the given key in the container. The range is defined by two iterators, one pointing to the first element that is not less than key and another pointing to the first element greater than key. Alternatively, the first iterator may be obtained with lower_bound(), and the second with upper_bound().
 
constexpr auto erase (iterator first, iterator last) -> iterator
 Removes the elements in the range [first; last), which must be a valid range in *this.
 
constexpr auto erase (iterator pos) noexcept -> iterator
 Removes the element at pos.
 
constexpr auto erase (key_type const &key) noexcept -> size_type
 Removes the element (if one exists) with the key equivalent to key.
 
template<typename K >
requires (detail::is_transparent_v<key_compare>)
constexpr auto find (K const &x) -> iterator
 Finds an element with key that compares equivalent to the value x.
 
template<typename K >
requires (detail::is_transparent_v<key_compare>)
constexpr auto find (K const &x) const -> const_iterator
 Finds an element with key that compares equivalent to the value x.
 
constexpr auto find (key_type const &key) const noexcept -> const_iterator
 Finds an element with key equivalent to key.
 
constexpr auto find (key_type const &key) noexcept -> iterator
 Finds an element with key equivalent to key.
 
constexpr auto full () const noexcept -> bool
 Checks if the container full, i.e. whether size() == Capacity.
 
template<typename InputIter >
requires (detail::InputIterator<InputIter>)
constexpr auto insert (InputIter first, InputIter last) noexcept(noexcept(insert(declval< key_type >()))) -> void
 Inserts elements from range [first, last). If multiple elements in the range have keys that compare equivalent, it is unspecified which element is inserted (pending LWG2844).
 
constexpr auto insert (value_type &&value) -> pair< iterator, bool > requires(is_move_constructible_v< value_type >)
 Inserts element into the container, if the container doesn't already contain an element with an equivalent key.
 
constexpr auto insert (value_type const &value) noexcept(noexcept(insert(etl::move(declval< key_type >())))) -> pair< iterator, bool > requires(is_copy_constructible_v< value_type >)
 Inserts element into the container, if the container doesn't already contain an element with an equivalent key.
 
constexpr auto key_comp () const noexcept -> key_compare
 Returns the function object that compares the keys, which is a copy of this container's constructor argument comp. It is the same as value_comp.
 
template<typename K >
requires (detail::is_transparent_v<key_compare>)
constexpr auto lower_bound (K const &key) -> iterator
 Returns an iterator pointing to the first element that is not less than (i.e. greater or equal to) key.
 
template<typename K >
requires (detail::is_transparent_v<key_compare>)
constexpr auto lower_bound (K const &key) const -> const_iterator
 Returns an iterator pointing to the first element that is not less than (i.e. greater or equal to) key.
 
constexpr auto lower_bound (key_type const &key) -> iterator
 Returns an iterator pointing to the first element that is not less than (i.e. greater or equal to) key.
 
constexpr auto lower_bound (key_type const &key) const -> const_iterator
 Returns an iterator pointing to the first element that is not less than (i.e. greater or equal to) key.
 
constexpr auto max_size () const noexcept -> size_type
 Returns the maximum number of elements the container is able to hold.
 
constexpr auto operator= (static_set &&other) noexcept(noexcept(etl::move(declval< storage_type >()))) -> static_set &=default
 
constexpr auto operator= (static_set const &other) -> static_set &=default
 
constexpr auto rbegin () const noexcept -> const_reverse_iterator
 Returns a reverse iterator to the first element of the reversed set. It corresponds to the last element of the non-reversed set.
 
constexpr auto rbegin () noexcept -> reverse_iterator
 Returns a reverse iterator to the first element of the reversed set. It corresponds to the last element of the non-reversed set.
 
constexpr auto rend () const noexcept -> const_reverse_iterator
 Returns a reverse iterator to the element following the last element of the reversed set. It corresponds to the element preceding the first element of the non-reversed set.
 
constexpr auto rend () noexcept -> reverse_iterator
 Returns a reverse iterator to the element following the last element of the reversed set. It corresponds to the element preceding the first element of the non-reversed set.
 
constexpr auto size () const noexcept -> size_type
 Returns the number of elements in the container, i.e. distance(begin(), end()).
 
constexpr auto swap (static_set &other) noexcept(is_nothrow_swappable_v< key_type >) -> void requires(is_assignable_v< key_type &, key_type && >)
 Exchanges the contents of the container with those of other.
 
template<typename K >
requires (detail::is_transparent_v<key_compare>)
constexpr auto upper_bound (K const &key) -> iterator
 Returns an iterator pointing to the first element that is greater than key.
 
template<typename K >
requires (detail::is_transparent_v<key_compare>)
constexpr auto upper_bound (K const &key) const -> const_iterator
 Returns an iterator pointing to the first element that is greater than key.
 
constexpr auto upper_bound (key_type const &key) -> iterator
 Returns an iterator pointing to the first element that is greater than key.
 
constexpr auto upper_bound (key_type const &key) const -> const_iterator
 Returns an iterator pointing to the first element that is greater than key.
 
constexpr auto value_comp () const noexcept -> value_compare
 Returns the function object that compares the values. It is the same as key_comp.
 

Detailed Description

template<typename Key, size_t Capacity, typename Compare = less<Key>>
struct etl::static_set< Key, Capacity, Compare >

static_set is an associative container that contains a sorted set of unique objects of type Key. Sorting is done using the key comparison function Compare.

Member Typedef Documentation

◆ const_iterator

◆ const_pointer

◆ const_reference

template<typename Key , size_t Capacity, typename Compare = less<Key>>
using const_reference = value_type const&

◆ const_reverse_iterator

◆ difference_type

template<typename Key , size_t Capacity, typename Compare = less<Key>>
using difference_type = ptrdiff_t

◆ iterator

◆ key_compare

template<typename Key , size_t Capacity, typename Compare = less<Key>>
using key_compare = Compare

◆ key_type

◆ pointer

◆ reference

template<typename Key , size_t Capacity, typename Compare = less<Key>>
using reference = value_type&

◆ reverse_iterator

◆ size_type

template<typename Key , size_t Capacity, typename Compare = less<Key>>
using size_type = size_t

◆ value_compare

template<typename Key , size_t Capacity, typename Compare = less<Key>>
using value_compare = Compare

◆ value_type

Constructor & Destructor Documentation

◆ static_set() [1/4]

template<typename Key , size_t Capacity, typename Compare = less<Key>>
constexpr static_set ( )
constexprdefault

Constructs empty container.

◆ static_set() [2/4]

template<typename Key , size_t Capacity, typename Compare = less<Key>>
template<typename InputIt >
requires (detail::InputIterator<InputIt>)
constexpr static_set ( InputIt  first,
InputIt  last 
)
inlineconstexpr

Constructs with the contents of the range [first, last). If multiple elements in the range have keys that compare equivalent, all but the first will be discarded.

◆ static_set() [3/4]

template<typename Key , size_t Capacity, typename Compare = less<Key>>
constexpr static_set ( static_set< Key, Capacity, Compare > const other)
constexprdefault

◆ static_set() [4/4]

template<typename Key , size_t Capacity, typename Compare = less<Key>>
constexpr static_set ( static_set< Key, Capacity, Compare > &&  other)
constexprdefaultnoexcept

Member Function Documentation

◆ begin() [1/2]

template<typename Key , size_t Capacity, typename Compare = less<Key>>
constexpr auto begin ( ) const -> const_iterator
inlineconstexprnoexcept

Returns an iterator to the first element of the set.

◆ begin() [2/2]

template<typename Key , size_t Capacity, typename Compare = less<Key>>
constexpr auto begin ( ) -> iterator
inlineconstexprnoexcept

Returns an iterator to the first element of the set.

◆ cbegin()

template<typename Key , size_t Capacity, typename Compare = less<Key>>
constexpr auto cbegin ( ) const -> const_iterator
inlineconstexprnoexcept

Returns an iterator to the first element of the set.

◆ cend()

template<typename Key , size_t Capacity, typename Compare = less<Key>>
constexpr auto cend ( ) const -> const_iterator
inlineconstexprnoexcept

Returns an iterator to the element following the last element of the set.

◆ clear()

template<typename Key , size_t Capacity, typename Compare = less<Key>>
constexpr auto clear ( ) -> void
inlineconstexprnoexcept

Erases all elements from the container. After this call, size() returns zero.

◆ contains() [1/2]

template<typename Key , size_t Capacity, typename Compare = less<Key>>
template<typename K >
requires (detail::is_transparent_v<key_compare>)
constexpr auto contains ( K const x) const -> bool
inlineconstexpr

Checks if there is an element with key that compares equivalent to the value x.

◆ contains() [2/2]

template<typename Key , size_t Capacity, typename Compare = less<Key>>
constexpr auto contains ( key_type const key) const -> bool
inlineconstexprnoexcept

Checks if there is an element with key equivalent to key in the container.

◆ count() [1/2]

template<typename Key , size_t Capacity, typename Compare = less<Key>>
template<typename K >
requires (detail::is_transparent_v<key_compare>)
constexpr auto count ( K const x) const -> size_type
inlineconstexpr

Returns the number of elements with key that compares equivalent to the value x.

◆ count() [2/2]

template<typename Key , size_t Capacity, typename Compare = less<Key>>
constexpr auto count ( key_type const key) const -> size_type
inlineconstexprnoexcept

Returns the number of elements with key that compares equivalent to the specified argument, which is either 1 or 0 since this container does not allow duplicates.

◆ crbegin()

template<typename Key , size_t Capacity, typename Compare = less<Key>>
constexpr auto crbegin ( ) const -> const_reverse_iterator
inlineconstexprnoexcept

Returns a reverse iterator to the first element of the reversed set. It corresponds to the last element of the non-reversed set.

◆ crend()

template<typename Key , size_t Capacity, typename Compare = less<Key>>
constexpr auto crend ( ) const -> const_reverse_iterator
inlineconstexprnoexcept

Returns a reverse iterator to the element following the last element of the reversed set. It corresponds to the element preceding the first element of the non-reversed set.

◆ emplace()

template<typename Key , size_t Capacity, typename Compare = less<Key>>
template<typename... Args>
requires (is_copy_constructible_v<key_type>)
constexpr auto emplace ( Args &&...  args) -> pair<iterator, bool>
inlineconstexprnoexcept

Inserts a new element into the container constructed in-place with the given args if there is no element with the key in the container.

◆ empty()

template<typename Key , size_t Capacity, typename Compare = less<Key>>
constexpr auto empty ( ) const -> bool
inlineconstexprnoexcept

Checks if the container has no elements, i.e. whether begin() == end().

◆ end() [1/2]

template<typename Key , size_t Capacity, typename Compare = less<Key>>
constexpr auto end ( ) const -> const_iterator
inlineconstexprnoexcept

Returns an iterator to the element following the last element of the set.

◆ end() [2/2]

template<typename Key , size_t Capacity, typename Compare = less<Key>>
constexpr auto end ( ) -> iterator
inlineconstexprnoexcept

Returns an iterator to the element following the last element of the set.

◆ equal_range() [1/4]

template<typename Key , size_t Capacity, typename Compare = less<Key>>
template<typename K >
requires (detail::is_transparent_v<key_compare>)
constexpr auto equal_range ( K const key) -> iterator
inlineconstexpr

Returns a range containing all elements with the given key in the container. The range is defined by two iterators, one pointing to the first element that is not less than key and another pointing to the first element greater than key. Alternatively, the first iterator may be obtained with lower_bound(), and the second with upper_bound().

◆ equal_range() [2/4]

template<typename Key , size_t Capacity, typename Compare = less<Key>>
template<typename K >
requires (detail::is_transparent_v<key_compare>)
constexpr auto equal_range ( K const key) const -> const_iterator
inlineconstexpr

Returns a range containing all elements with the given key in the container. The range is defined by two iterators, one pointing to the first element that is not less than key and another pointing to the first element greater than key. Alternatively, the first iterator may be obtained with lower_bound(), and the second with upper_bound().

◆ equal_range() [3/4]

template<typename Key , size_t Capacity, typename Compare = less<Key>>
constexpr auto equal_range ( key_type const key) -> iterator
inlineconstexpr

Returns a range containing all elements with the given key in the container. The range is defined by two iterators, one pointing to the first element that is not less than key and another pointing to the first element greater than key. Alternatively, the first iterator may be obtained with lower_bound(), and the second with upper_bound().

◆ equal_range() [4/4]

template<typename Key , size_t Capacity, typename Compare = less<Key>>
constexpr auto equal_range ( key_type const key) const -> const_iterator
inlineconstexpr

Returns a range containing all elements with the given key in the container. The range is defined by two iterators, one pointing to the first element that is not less than key and another pointing to the first element greater than key. Alternatively, the first iterator may be obtained with lower_bound(), and the second with upper_bound().

◆ erase() [1/3]

template<typename Key , size_t Capacity, typename Compare = less<Key>>
constexpr auto erase ( iterator  first,
iterator  last 
) -> iterator
inlineconstexpr

Removes the elements in the range [first; last), which must be a valid range in *this.

https://en.cppreference.com/w/cpp/container/set/erase

Returns
Iterator following the last removed element.

◆ erase() [2/3]

template<typename Key , size_t Capacity, typename Compare = less<Key>>
constexpr auto erase ( iterator  pos) -> iterator
inlineconstexprnoexcept

Removes the element at pos.

https://en.cppreference.com/w/cpp/container/set/erase

Returns
Iterator following the last removed element.

◆ erase() [3/3]

template<typename Key , size_t Capacity, typename Compare = less<Key>>
constexpr auto erase ( key_type const key) -> size_type
inlineconstexprnoexcept

Removes the element (if one exists) with the key equivalent to key.

https://en.cppreference.com/w/cpp/container/set/erase

Returns
Number of elements removed.

◆ find() [1/4]

template<typename Key , size_t Capacity, typename Compare = less<Key>>
template<typename K >
requires (detail::is_transparent_v<key_compare>)
constexpr auto find ( K const x) -> iterator
inlineconstexpr

Finds an element with key that compares equivalent to the value x.

◆ find() [2/4]

template<typename Key , size_t Capacity, typename Compare = less<Key>>
template<typename K >
requires (detail::is_transparent_v<key_compare>)
constexpr auto find ( K const x) const -> const_iterator
inlineconstexpr

Finds an element with key that compares equivalent to the value x.

◆ find() [3/4]

template<typename Key , size_t Capacity, typename Compare = less<Key>>
constexpr auto find ( key_type const key) const -> const_iterator
inlineconstexprnoexcept

Finds an element with key equivalent to key.

Returns
Iterator to an element with key equivalent to key. If no such element is found, past-the-end (see end()) iterator is returned.

◆ find() [4/4]

template<typename Key , size_t Capacity, typename Compare = less<Key>>
constexpr auto find ( key_type const key) -> iterator
inlineconstexprnoexcept

Finds an element with key equivalent to key.

Returns
Iterator to an element with key equivalent to key. If no such element is found, past-the-end (see end()) iterator is returned.

◆ full()

template<typename Key , size_t Capacity, typename Compare = less<Key>>
constexpr auto full ( ) const -> bool
inlineconstexprnoexcept

Checks if the container full, i.e. whether size() == Capacity.

◆ insert() [1/3]

template<typename Key , size_t Capacity, typename Compare = less<Key>>
template<typename InputIter >
requires (detail::InputIterator<InputIter>)
constexpr auto insert ( InputIter  first,
InputIter  last 
) -> void
inlineconstexprnoexcept

Inserts elements from range [first, last). If multiple elements in the range have keys that compare equivalent, it is unspecified which element is inserted (pending LWG2844).

◆ insert() [2/3]

template<typename Key , size_t Capacity, typename Compare = less<Key>>
constexpr auto insert ( value_type &&  value) -> pair<iterator, bool> requires(is_move_constructible_v<value_type>)
inlineconstexpr

Inserts element into the container, if the container doesn't already contain an element with an equivalent key.

◆ insert() [3/3]

template<typename Key , size_t Capacity, typename Compare = less<Key>>
constexpr auto insert ( value_type const value) -> pair<iterator, bool> requires(is_copy_constructible_v<value_type>)
inlineconstexprnoexcept

Inserts element into the container, if the container doesn't already contain an element with an equivalent key.

◆ key_comp()

template<typename Key , size_t Capacity, typename Compare = less<Key>>
constexpr auto key_comp ( ) const -> key_compare
inlineconstexprnoexcept

Returns the function object that compares the keys, which is a copy of this container's constructor argument comp. It is the same as value_comp.

Returns
The key comparison function object.

◆ lower_bound() [1/4]

template<typename Key , size_t Capacity, typename Compare = less<Key>>
template<typename K >
requires (detail::is_transparent_v<key_compare>)
constexpr auto lower_bound ( K const key) -> iterator
inlineconstexpr

Returns an iterator pointing to the first element that is not less than (i.e. greater or equal to) key.

◆ lower_bound() [2/4]

template<typename Key , size_t Capacity, typename Compare = less<Key>>
template<typename K >
requires (detail::is_transparent_v<key_compare>)
constexpr auto lower_bound ( K const key) const -> const_iterator
inlineconstexpr

Returns an iterator pointing to the first element that is not less than (i.e. greater or equal to) key.

◆ lower_bound() [3/4]

template<typename Key , size_t Capacity, typename Compare = less<Key>>
constexpr auto lower_bound ( key_type const key) -> iterator
inlineconstexpr

Returns an iterator pointing to the first element that is not less than (i.e. greater or equal to) key.

◆ lower_bound() [4/4]

template<typename Key , size_t Capacity, typename Compare = less<Key>>
constexpr auto lower_bound ( key_type const key) const -> const_iterator
inlineconstexpr

Returns an iterator pointing to the first element that is not less than (i.e. greater or equal to) key.

◆ max_size()

template<typename Key , size_t Capacity, typename Compare = less<Key>>
constexpr auto max_size ( ) const -> size_type
inlineconstexprnoexcept

Returns the maximum number of elements the container is able to hold.

◆ operator=() [1/2]

template<typename Key , size_t Capacity, typename Compare = less<Key>>
constexpr auto operator= ( static_set< Key, Capacity, Compare > &&  other) -> static_set &=default
constexprdefaultnoexcept

◆ operator=() [2/2]

template<typename Key , size_t Capacity, typename Compare = less<Key>>
constexpr auto operator= ( static_set< Key, Capacity, Compare > const other) -> static_set &=default
constexprdefault

◆ rbegin() [1/2]

template<typename Key , size_t Capacity, typename Compare = less<Key>>
constexpr auto rbegin ( ) const -> const_reverse_iterator
inlineconstexprnoexcept

Returns a reverse iterator to the first element of the reversed set. It corresponds to the last element of the non-reversed set.

◆ rbegin() [2/2]

template<typename Key , size_t Capacity, typename Compare = less<Key>>
constexpr auto rbegin ( ) -> reverse_iterator
inlineconstexprnoexcept

Returns a reverse iterator to the first element of the reversed set. It corresponds to the last element of the non-reversed set.

◆ rend() [1/2]

template<typename Key , size_t Capacity, typename Compare = less<Key>>
constexpr auto rend ( ) const -> const_reverse_iterator
inlineconstexprnoexcept

Returns a reverse iterator to the element following the last element of the reversed set. It corresponds to the element preceding the first element of the non-reversed set.

◆ rend() [2/2]

template<typename Key , size_t Capacity, typename Compare = less<Key>>
constexpr auto rend ( ) -> reverse_iterator
inlineconstexprnoexcept

Returns a reverse iterator to the element following the last element of the reversed set. It corresponds to the element preceding the first element of the non-reversed set.

◆ size()

template<typename Key , size_t Capacity, typename Compare = less<Key>>
constexpr auto size ( ) const -> size_type
inlineconstexprnoexcept

Returns the number of elements in the container, i.e. distance(begin(), end()).

◆ swap()

template<typename Key , size_t Capacity, typename Compare = less<Key>>
constexpr auto swap ( static_set< Key, Capacity, Compare > &  other) -> void requires(is_assignable_v<key_type&, key_type &&>)
inlineconstexprnoexcept

Exchanges the contents of the container with those of other.

◆ upper_bound() [1/4]

template<typename Key , size_t Capacity, typename Compare = less<Key>>
template<typename K >
requires (detail::is_transparent_v<key_compare>)
constexpr auto upper_bound ( K const key) -> iterator
inlineconstexpr

Returns an iterator pointing to the first element that is greater than key.

◆ upper_bound() [2/4]

template<typename Key , size_t Capacity, typename Compare = less<Key>>
template<typename K >
requires (detail::is_transparent_v<key_compare>)
constexpr auto upper_bound ( K const key) const -> const_iterator
inlineconstexpr

Returns an iterator pointing to the first element that is greater than key.

◆ upper_bound() [3/4]

template<typename Key , size_t Capacity, typename Compare = less<Key>>
constexpr auto upper_bound ( key_type const key) -> iterator
inlineconstexpr

Returns an iterator pointing to the first element that is greater than key.

◆ upper_bound() [4/4]

template<typename Key , size_t Capacity, typename Compare = less<Key>>
constexpr auto upper_bound ( key_type const key) const -> const_iterator
inlineconstexpr

Returns an iterator pointing to the first element that is greater than key.

◆ value_comp()

template<typename Key , size_t Capacity, typename Compare = less<Key>>
constexpr auto value_comp ( ) const -> value_compare
inlineconstexprnoexcept

Returns the function object that compares the values. It is the same as key_comp.

Returns
The value comparison function object.

The documentation for this struct was generated from the following file: