![]() |
Arene Base
Fundamental Utilities For Safety Critical C++
|
A non-allocating fixed-capacity associative container storing elements of type Value .
More...

Public Types | |
| using | const_iterator = iterator |
A const iterator for the set: the same as iterator, since elements are const. | |
| using | const_pointer = value_type const* |
| A pointer to a const value. | |
| using | const_reference = value_type const& |
| A reference to a const value. | |
| using | const_reverse_iterator = ::arene::base::reverse_iterator<const_iterator> |
| A const reverse iterator for the set. | |
| using | difference_type = std::ptrdiff_t |
| The type of the difference between two iterators. | |
| using | iterator = iterator_impl |
| The iterator type for the set. | |
| using | key_compare = Compare |
| The type of the comparator for the key. | |
| using | key_type = Value |
| The type of the key in the set, which is the same as the value. | |
| using | pointer = value_type* |
| A pointer to the value. | |
| using | reference = value_type& |
| A reference to a value. | |
| using | reverse_iterator = ::arene::base::reverse_iterator<iterator> |
| A reverse iterator for the set. | |
| using | size_type = std::size_t |
| The type of the size of the container. | |
| using | value_compare = Compare |
| The type of the comparator for the value. | |
| using | value_type = Value |
| The type of the value in the set. | |
Public Member Functions | |
| inline_set ()=default | |
| Construct a set with no elements and a default-constructed comparator. | |
| inline_set (Compare const &comp) noexcept(std::is_nothrow_copy_constructible< Compare >::value) | |
| Construct a set with no elements, using the specified comparator. | |
| inline_set (inline_set const &)=default | |
| copy ctor. | |
| template<std::size_t OtherCapacity, constraints< std::enable_if_t<(OtherCapacity > Capacity)>, std::enable_if_t< std::is_move_constructible< inline_set< Value, OtherCapacity, Compare > >::value >> | |
| inline_set (inline_set< Value, OtherCapacity, Compare > &&other) | |
| move construct from a set with a larger capacity | |
| template<std::size_t OtherCapacity, constraints< std::enable_if_t<(OtherCapacity< Capacity)>, std::enable_if_t< std::is_move_constructible< inline_set< Value, OtherCapacity, Compare > >::value > > = nullptr> | |
| inline_set (inline_set< Value, OtherCapacity, Compare > &&other) noexcept(std::is_nothrow_move_constructible< Value >::value &&std::is_nothrow_move_constructible< Compare >::value) | |
| move construct from a set with a smaller capacity | |
| template<std::size_t OtherCapacity, constraints< std::enable_if_t<(OtherCapacity< Capacity)>, std::enable_if_t< std::is_copy_constructible< inline_set< Value, OtherCapacity, Compare > >::value > > = nullptr> | |
| inline_set (inline_set< Value, OtherCapacity, Compare > const &other) noexcept(std::is_nothrow_copy_constructible< Value >::value &&std::is_nothrow_copy_constructible< Compare >::value) | |
| copy construct from a set with a smaller capacity | |
| template<std::size_t OtherCapacity, constraints< std::enable_if_t<(OtherCapacity > Capacity)>, std::enable_if_t< std::is_copy_constructible< inline_set< Value, OtherCapacity, Compare > >::value >> | |
| inline_set (inline_set< Value, OtherCapacity, Compare > const &other) noexcept(std::is_nothrow_copy_constructible< Value >::value &&std::is_nothrow_copy_constructible< Compare >::value) | |
| copy construct from a set with a larger capacity | |
| template<typename Iterator, constraints< std::enable_if_t< base::is_input_iterator_v< Iterator > >, std::enable_if_t< std::is_constructible< Value, typename std::iterator_traits< Iterator >::reference >::value > > = nullptr> | |
| inline_set (Iterator first, Iterator last) noexcept(std::is_nothrow_constructible< Value, typename std::iterator_traits< Iterator >::reference >::value &&std::is_nothrow_constructible< Compare >::value) | |
| Construct a set from the elements in the provided iterator range. | |
| template<typename Iterator, constraints< std::enable_if_t< base::is_input_iterator_v< Iterator > >, std::enable_if_t< std::is_constructible< Value, typename std::iterator_traits< Iterator >::reference >::value > > = nullptr> | |
| inline_set (Iterator first, Iterator last, Compare const &comp) noexcept(std::is_nothrow_constructible< Value, typename std::iterator_traits< Iterator >::reference >::value &&std::is_nothrow_copy_constructible< Compare >::value) | |
| Construct a set from the elements in the provided iterator range and comparator. | |
| inline_set (move_construct_source &&other) noexcept(std::is_nothrow_move_constructible< Value >::value &&std::is_nothrow_constructible< Compare >::value) | |
| move ctor | |
| inline_set (std::initializer_list< Value > init) noexcept(std::is_nothrow_copy_constructible< Value >::value &&std::is_nothrow_constructible< Compare >::value) | |
| Construct a set from the specified list of values. | |
| inline_set (std::initializer_list< Value > init, Compare const &comp) noexcept(std::is_nothrow_copy_constructible< Value >::value &&std::is_nothrow_copy_constructible< Compare >::value) | |
| Construct a set from the specified list of values and a specified comparator instance . | |
| ~inline_set ()=default | |
| Default destructor; destroys all stored elements. | |
| auto | begin () const noexcept -> const_iterator |
| Obtain an iterator referring to the beginning of the sorted range of elements. | |
| auto | cbegin () const noexcept -> const_iterator |
| Obtain an iterator referring to the beginning of the sorted range of elements. | |
| auto | cend () const noexcept -> const_iterator |
| Obtain an iterator referring to one past the last element in the sorted range of elements. | |
| void | clear () noexcept |
Erase all the elements in *this. | |
| template<typename OtherKey, constraints< std::enable_if_t< transparent_comparison_supported_for< OtherKey > > > = nullptr> | |
| auto | contains (OtherKey const &value) const noexcept(comparison_is_noexcept< OtherKey >) -> bool |
| Check if the set contains a value equivalent to a specific value. | |
| auto | contains (Value const &value_to_check) const noexcept(comparison_is_noexcept<>) -> bool |
| Check if the set contains a specific value. | |
| template<typename OtherKey, constraints< std::enable_if_t< transparent_comparison_supported_for< OtherKey > > > = nullptr> | |
| auto | count (OtherKey const &value) const noexcept(comparison_is_noexcept< OtherKey >) -> std::size_t |
| Return the number of elements in the set equivalent to a specific value. | |
| auto | count (Value const &value_to_count) const noexcept(comparison_is_noexcept<>) -> std::size_t |
| Return the number of elements in the set equivalent to a specific value. | |
| auto | crbegin () const noexcept -> const_reverse_iterator |
| Obtain an iterator referring to the beginning of a reversed traversal of the sorted range of elements. | |
| auto | crend () const noexcept -> const_reverse_iterator |
| Obtain an iterator referring to one past the last element in a reversed traversal of the sorted range of elements. | |
| template<typename... ArgTypes, constraints< std::enable_if_t< std::is_constructible< Value, ArgTypes &&... >::value > > = nullptr> | |
| auto | emplace (ArgTypes &&... args) -> std::pair< iterator, bool > |
| Construct a new element from the specified initialization arguments, and then attempt to insert it. | |
| ARENE_NODISCARD auto | empty () const noexcept -> bool |
| Check if the set is empty. | |
| auto | end () const noexcept -> const_iterator |
| Obtain an iterator referring to one past the last element in the sorted range of elements. | |
| auto | entry_at_index (inline_set_detail::set_passkey, index_type index) const noexcept -> entry_type const & |
| Gets a reference to the element corrsponding to a given index. | |
| auto | entry_at_index (inline_set_detail::set_passkey, index_type index) noexcept -> entry_type & |
| Gets a reference to the element corrsponding to a given index. | |
| template<typename OtherKey, constraints< std::enable_if_t< transparent_comparison_supported_for< OtherKey > > > = nullptr> | |
| auto | equal_range (OtherKey const &value) const noexcept(comparison_is_noexcept< OtherKey >) -> std::pair< const_iterator, const_iterator > |
| Finds the sequence of values which compare equivalent to a given value. | |
| template<typename OtherKey, constraints< std::enable_if_t< transparent_comparison_supported_for< OtherKey > > > = nullptr> | |
| auto | equal_range (OtherKey const &value) noexcept(comparison_is_noexcept< OtherKey >) -> std::pair< iterator, iterator > |
| Finds the sequence of values which compare equivalent to a given value. | |
| auto | equal_range (Value const &value_to_find) const noexcept(comparison_is_noexcept<>) -> std::pair< const_iterator, const_iterator > |
| Finds the sequence of values which compare equivalent to a given value. | |
| auto | equal_range (Value const &value_to_find) noexcept(comparison_is_noexcept<>) -> std::pair< iterator, iterator > |
| Finds the sequence of values which compare equivalent to a given value. | |
| auto | erase (iterator first, iterator last) noexcept -> iterator |
| Erase all the elements referred to be the specified iterator range. | |
| auto | erase (iterator pos) noexcept -> iterator |
| Erase the element referred to be the specified iterator. | |
| template<typename OtherKey, constraints< std::enable_if_t< transparent_comparison_supported_for< OtherKey > > > = nullptr> | |
| auto | erase (OtherKey const &value) noexcept(comparison_is_noexcept< OtherKey >) -> size_type |
| Erase any elements with a value equivalent to the supplied element. | |
| auto | erase (Value const &value_to_erase) noexcept(comparison_is_noexcept<>) -> size_type |
| Erase any elements with a value equivalent to the supplied element. | |
| template<typename OtherKey, constraints< std::enable_if_t< transparent_comparison_supported_for< OtherKey > > > = nullptr> | |
| auto | find (OtherKey const &value) const noexcept(comparison_is_noexcept< OtherKey >) -> const_iterator |
| Obtain an iterator referring to the element equivalent to the supplied value, if there is one. | |
| template<typename OtherKey, constraints< std::enable_if_t< transparent_comparison_supported_for< OtherKey > > > = nullptr> | |
| auto | find (OtherKey const &value) noexcept(comparison_is_noexcept< OtherKey >) -> iterator |
| Obtain an iterator referring to the element equivalent to the supplied value, if there is one. | |
| auto | find (Value const &value_to_find) const noexcept(comparison_is_noexcept<>) -> const_iterator |
| Obtain an iterator referring to the element equivalent to the supplied value, if there is one. | |
| auto | find (Value const &value_to_find) noexcept(comparison_is_noexcept<>) -> iterator |
| Obtain an iterator referring to the element equivalent to the supplied value, if there is one. | |
| auto | get_comparator_base (inline_set_detail::set_passkey) const noexcept -> comparator_base const & |
| Get the comparator base. | |
| auto | get_comparator_base (inline_set_detail::set_passkey) noexcept -> comparator_base & |
| Get the comparator base. | |
| template<typename Iterator, constraints< std::enable_if_t< base::is_input_iterator_v< Iterator > >, std::enable_if_t< std::is_constructible< Value, typename std::iterator_traits< Iterator >::reference >::value > > = nullptr> | |
| void | insert (Iterator first, Iterator last) noexcept(std::is_nothrow_constructible< Value, >::value) |
| Insert all the elements in the provided iterator range into the set, if there are not already equivalent elements. | |
| template<typename OtherKey, typename SfinaeKey = Value, constraints< std::enable_if_t< transparent_comparison_supported_for< OtherKey > >, std::enable_if_t<!std::is_integral< SfinaeKey >::value >, std::enable_if_t< std::is_constructible< Value, OtherKey && >::value > > = nullptr> | |
| auto | insert (OtherKey &&value) noexcept(comparison_is_noexcept< OtherKey > &&std::is_nothrow_constructible< Value, OtherKey && >::value) -> std::pair< iterator, bool > |
| Attempt to insert an element into the set. | |
| void | insert (std::initializer_list< Value > init) |
| Attempt to insert the elements in the provided initializer list into the set. | |
| auto | insert (Value &&value_to_insert) noexcept(comparison_is_noexcept<> &&std::is_nothrow_move_constructible< Value >::value) -> std::pair< iterator, bool > |
| Attempt to insert an element into the set. | |
| auto | insert (Value const &value_to_insert) noexcept(comparison_is_noexcept<> &&std::is_nothrow_copy_constructible< Value >::value) -> std::pair< iterator, bool > |
| Attempt to insert an element into the set. | |
| auto | key_comp () const noexcept(std::is_nothrow_copy_constructible< Compare >::value) -> key_compare |
| Get the comparator. | |
| template<typename OtherKey, constraints< std::enable_if_t< transparent_comparison_supported_for< OtherKey > > > = nullptr> | |
| auto | lower_bound (OtherKey const &value) const noexcept(comparison_is_noexcept< OtherKey >) -> const_iterator |
| Find the first element which is not less than a given value. | |
| template<typename OtherKey, constraints< std::enable_if_t< transparent_comparison_supported_for< OtherKey > > > = nullptr> | |
| auto | lower_bound (OtherKey const &value) noexcept(comparison_is_noexcept< OtherKey >) -> iterator |
| Find the first element which is not less than a given value. | |
| auto | lower_bound (Value const &value_to_find) const noexcept(comparison_is_noexcept<>) -> const_iterator |
| Find the first element which is not less than a given value. | |
| auto | lower_bound (Value const &value_to_find) noexcept(comparison_is_noexcept<>) -> iterator |
| Find the first element which is not less than a given value. | |
| auto | operator= (copy_assign_source const &other) noexcept(std::is_nothrow_copy_constructible< Value >::value &&std::is_nothrow_copy_assignable< Compare >::value) -> inline_set & |
| copy-assignment operator. | |
| auto | operator= (deleted_copy_assign_source const &other) -> inline_set &=delete |
| Deleted copy-assignment operator where the set is not copy-assignable. | |
| auto | operator= (deleted_move_assign_source &&) -> inline_set &=delete |
| The move assignment operator is deleted if move assignment is not supported. | |
| template<std::size_t OtherCapacity, constraints< std::enable_if_t<(OtherCapacity > Capacity)>, std::enable_if_t< std::is_move_assignable< inline_set< Value, OtherCapacity, Compare > >::value >> | |
| auto | operator= (inline_set< Value, OtherCapacity, Compare > &&other) -> inline_set & |
move-assignment operator from an inline_set with a larger capacity | |
| template<std::size_t OtherCapacity, constraints< std::enable_if_t<(OtherCapacity< Capacity)>, std::enable_if_t< std::is_move_assignable< inline_set< Value, OtherCapacity, Compare > >::value > > = nullptr> | |
| auto | operator= (inline_set< Value, OtherCapacity, Compare > &&other) noexcept(std::is_nothrow_move_assignable< inline_set< Value, OtherCapacity, Compare > >::value) -> inline_set & |
move-assignment operator from an inline_set with a smaller capacity | |
| template<std::size_t OtherCapacity, constraints< std::enable_if_t<(OtherCapacity< Capacity)>, std::enable_if_t< std::is_copy_assignable< inline_set< Value, OtherCapacity, Compare > >::value > > = nullptr> | |
| auto | operator= (inline_set< Value, OtherCapacity, Compare > const &other) noexcept(std::is_nothrow_copy_assignable< inline_set< Value, OtherCapacity, Compare > >::value) -> inline_set & |
| copy-assignment operator for copying from a set with a smaller capacity | |
| template<std::size_t OtherCapacity, constraints< std::enable_if_t<(OtherCapacity > Capacity)>, std::enable_if_t< std::is_copy_assignable< inline_set< Value, OtherCapacity, Compare > >::value >> | |
| auto | operator= (inline_set< Value, OtherCapacity, Compare > const &other) noexcept(std::is_nothrow_copy_constructible< Value >::value &&std::is_nothrow_copy_assignable< Compare >::value) -> inline_set & |
| copy-assignment operator for copying from a set with a larger capacity | |
| auto | operator= (move_assign_source &&other) noexcept(std::is_nothrow_move_constructible< Value >::value &&std::is_nothrow_move_assignable< Compare >::value) -> inline_set & |
| move-assignment operator | |
| auto | rbegin () const noexcept -> const_reverse_iterator |
| Obtain an iterator referring to the beginning of a reversed traversal of the sorted range of elements. | |
| auto | rend () const noexcept -> const_reverse_iterator |
| Obtain an iterator referring to one past the last element in a reversed traversal of the sorted range of elements. | |
| auto | size () const noexcept -> std::size_t |
| Get the number of elements in the set. | |
| template<typename OtherKey, constraints< std::enable_if_t< transparent_comparison_supported_for< OtherKey > > > = nullptr> | |
| auto | upper_bound (OtherKey const &value) const noexcept(comparison_is_noexcept< OtherKey >) -> const_iterator |
| Find the first element which is greater than a given value. | |
| template<typename OtherKey, constraints< std::enable_if_t< transparent_comparison_supported_for< OtherKey > > > = nullptr> | |
| auto | upper_bound (OtherKey const &value) noexcept(comparison_is_noexcept< OtherKey >) -> iterator |
| Find the first element which is greater than a given value. | |
| auto | upper_bound (Value const &value_to_find) const noexcept(comparison_is_noexcept<>) -> const_iterator |
| Find the first element which is greater than a given value. | |
| auto | upper_bound (Value const &value_to_find) noexcept(comparison_is_noexcept<>) -> iterator |
| Find the first element which is greater than a given value. | |
| auto | value_comp () const noexcept(std::is_nothrow_copy_constructible< Compare >::value) -> value_compare |
| Get the comparator. | |
Static Public Member Functions | |
| template<size_type OtherCapacity> | |
| static ARENE_NODISCARD auto | fast_inequality_check (inline_set const &lhs, inline_set< Value, OtherCapacity, Compare > const &rhs) noexcept -> inequality_heuristic |
| Fast inequality heuristic to shortcut on different sized containers. | |
| template<size_type OtherCapacity, typename SfinaeKey = key_type, constraints< std::enable_if_t< compare_three_way_supported_v< SfinaeKey > > > = nullptr> | |
| static ARENE_NODISCARD auto | three_way_compare (inline_set const &lhs, inline_set< Value, OtherCapacity, Compare > const &rhs) noexcept -> strong_ordering |
| Compares two sets lexicographically . | |
| template<std::size_t OtherCapacity, constraints< std::enable_if_t<(OtherCapacity > Capacity)>, std::enable_if_t< std::is_copy_constructible< inline_set< Value, OtherCapacity, Compare > >::value >> | |
| static ARENE_NODISCARD auto | try_construct (inline_set< Value, OtherCapacity, Compare > &&other) noexcept(noexcept(inline_set{other})) -> optional< inline_set > |
| Attempts to construct a set via move-construction from a set with a larger capacity. | |
| template<std::size_t OtherCapacity, constraints< std::enable_if_t<(OtherCapacity<=Capacity)>, std::enable_if_t< std::is_copy_constructible< inline_set< Value, OtherCapacity, Compare > >::value > > = nullptr> | |
| static ARENE_NODISCARD auto | try_construct (inline_set< Value, OtherCapacity, Compare > &&other) noexcept(noexcept(inline_set{std::move(other)})) -> optional< inline_set > |
| Attempts to construct a set via move-construction from a set with a capacity that is less than or equal to the target capacity. | |
| template<std::size_t OtherCapacity, constraints< std::enable_if_t<(OtherCapacity<=Capacity)>, std::enable_if_t< std::is_copy_constructible< inline_set< Value, OtherCapacity, Compare > >::value > > = nullptr> | |
| static ARENE_NODISCARD auto | try_construct (inline_set< Value, OtherCapacity, Compare > const &other) noexcept(noexcept(inline_set{other})) -> optional< inline_set > |
| Attempts to construct a set via copy-construction from a set with the same or smaller capacity. | |
| template<std::size_t OtherCapacity, constraints< std::enable_if_t<(OtherCapacity > Capacity)>, std::enable_if_t< std::is_copy_constructible< inline_set< Value, OtherCapacity, Compare > >::value >> | |
| static ARENE_NODISCARD auto | try_construct (inline_set< Value, OtherCapacity, Compare > const &other) noexcept(noexcept(inline_set{other})) -> optional< inline_set > |
| Attempts to construct a set from a set with a larger capacity. | |
| template<typename Iterator, constraints< std::enable_if_t< base::is_input_iterator_v< Iterator > >, std::enable_if_t< std::is_constructible< Value, typename std::iterator_traits< Iterator >::reference >::value > > = nullptr> | |
| static ARENE_NODISCARD auto | try_construct (Iterator first, Iterator last) noexcept(noexcept(inline_set{first, last}) &&std::is_nothrow_move_constructible< inline_set >::value) -> optional< inline_set > |
| Attempt to construct a set from the specified sequence of values. | |
| template<typename Iterator, constraints< std::enable_if_t< base::is_input_iterator_v< Iterator > >, std::enable_if_t< std::is_constructible< Value, typename std::iterator_traits< Iterator >::reference >::value > > = nullptr> | |
| static ARENE_NODISCARD auto | try_construct (Iterator first, Iterator last, Compare const &comp) noexcept(noexcept(inline_set{first, last, comp}) &&std::is_nothrow_move_constructible< inline_set >::value) -> optional< inline_set > |
| Attempt to construct a set from the specified sequence of values and a comparator. | |
| static ARENE_NODISCARD auto | try_construct (std::initializer_list< Value > init) noexcept(noexcept(inline_set{init}) &&std::is_nothrow_move_constructible< inline_set >::value) -> optional< inline_set > |
| Attempt to construct a set from the specified list of values. | |
| static ARENE_NODISCARD auto | try_construct (std::initializer_list< Value > init, Compare const &comp) noexcept(noexcept(inline_set{init, comp}) &&std::is_nothrow_move_constructible< inline_set >::value) -> optional< inline_set > |
| Attempt to construct a set from the specified list of values and a comparator. | |
Static Public Attributes | |
| static constexpr std::integral_constant< size_type, Capacity > | capacity {} |
| The maximum number of elements that can be held in the set. | |
| static constexpr std::integral_constant< size_type, Capacity > | max_size {} |
| Get the maximum number of elements in the set. | |
A non-allocating fixed-capacity associative container storing elements of type Value .
Any attempt to store more than Capacity elements will result in an ARENE_PRECONDITION violation. The comparison function specified with the Compare template parameter can either return bool, in which case it is assumed to be a simple ordering comparison like std::less, or it can return strong_ordering, in which case it is assumed to be a three-way comparison operator. The default comparison is three_way_compare.
| Value | The type of values stored in the set. Must satisfy std::is_nothrow_destructible . |
| Capacity | The maximum number of elements that can be stored in the set . |
| Compare | The comparison function used to impose a sort order on the elements. Must satisfy std::is_nothrow_destructible as well as either is_invocable_r_v<bool, const Compare&, const Value&, const Value&> or is_invocable_r_v<strong_ordering, const Compare&, const Value&, const Value&>. The comparison must provide a strict ordering over the values of Value , and copies or moves of the comparator must yield the same ordering. Defaults to compare_three_way . |
| using arene::base::inline_set< Value, Capacity, Compare >::const_iterator = iterator |
A const iterator for the set: the same as iterator, since elements are const.
| using arene::base::inline_set< Value, Capacity, Compare >::const_pointer = value_type const* |
A pointer to a const value.
| using arene::base::inline_set< Value, Capacity, Compare >::const_reference = value_type const& |
A reference to a const value.
| using arene::base::inline_set< Value, Capacity, Compare >::const_reverse_iterator = ::arene::base::reverse_iterator<const_iterator> |
A const reverse iterator for the set.
| using arene::base::inline_set< Value, Capacity, Compare >::difference_type = std::ptrdiff_t |
The type of the difference between two iterators.
| using arene::base::inline_set< Value, Capacity, Compare >::iterator = iterator_impl |
The iterator type for the set.
| using arene::base::inline_set< Value, Capacity, Compare >::key_compare = Compare |
The type of the comparator for the key.
| using arene::base::inline_set< Value, Capacity, Compare >::key_type = Value |
The type of the key in the set, which is the same as the value.
| using arene::base::inline_set< Value, Capacity, Compare >::pointer = value_type* |
A pointer to the value.
| using arene::base::inline_set< Value, Capacity, Compare >::reference = value_type& |
A reference to a value.
| using arene::base::inline_set< Value, Capacity, Compare >::reverse_iterator = ::arene::base::reverse_iterator<iterator> |
A reverse iterator for the set.
| using arene::base::inline_set< Value, Capacity, Compare >::size_type = std::size_t |
The type of the size of the container.
| using arene::base::inline_set< Value, Capacity, Compare >::value_compare = Compare |
The type of the comparator for the value.
| using arene::base::inline_set< Value, Capacity, Compare >::value_type = Value |
The type of the value in the set.
|
default |
Construct a set with no elements and a default-constructed comparator.
|
default |
Default destructor; destroys all stored elements.
|
inlineexplicitnoexcept |
Construct a set with no elements, using the specified comparator.
| comp | The comparator to use |
size()==0
|
inlinenoexcept |
Construct a set from the specified list of values.
| init | The list of elements to store in the set |
size()==init.size() init , sorted via a default-constructed instance of Compare . init.size()<=max_size() else ARENE_PRECONDITION violation .
|
inlinenoexcept |
Construct a set from the specified list of values and a specified comparator instance .
| init | The list of elements to store in the set . |
| comp | The comparator to use. |
size()==init.size() init , sorted via comp . init.size()<=max_size() else ARENE_PRECONDITION violation .
|
inlinenoexcept |
Construct a set from the elements in the provided iterator range.
| Iterator | The type of the iterators. Must satisfy std::is_constructible<Value,std::iterator_traits<Iterator>::reference> . |
| first | The iterator to the first element in the range |
| last | The iterator to the one-past-the-end element in the range |
size() will be equal to the number of unique elements in the range [first,last) [first,last) , sorted via a default-constructed instance of Compare . [first,last) is less than or equal to max_size() , else ARENE_PRECONDITION violation.
|
inlinenoexcept |
Construct a set from the elements in the provided iterator range and comparator.
| Iterator | The type of the iterators. Must satisfy std::is_constructible<Value,std::iterator_traits<Iterator>::reference> . |
| first | The iterator to the first element in the range |
| last | The iterator to the one-past-the-end element in the range |
| comp | The comparator to use . |
size() will be equal to the number of unique elements in the range [first,last) [first,last) , sorted via comp . [first,last) is less than or equal to max_size() , else ARENE_PRECONDITION violation.
|
default |
copy ctor.
|
inlinenoexcept |
copy construct from a set with a smaller capacity
Participates in overload resolution if Value and Compare satisfy is_copy_constructible
| OtherCapacity | The capacity of the other set |
| other | The set to copy from. |
size()==other.size() other , produced as if via copy-construction.
|
inlinenoexcept |
copy construct from a set with a larger capacity
Participates in overload resolution if Value and Compare satisfy is_copy_constructible
| OtherCapacity | The capacity of the other set |
| other | The set to copy from. |
size()==other.size() other , produced as if via copy-construction. other.size()<=maximum_size() else ARENE_PRECONDITION violation.
|
inlinenoexcept |
move ctor
Participates in overload resolution if Value satisfies is_move_constructible
| OtherCapacity | The maximum capacity of the other set to move from. |
| other | The set to move from |
size()==other.size() other , produced as if via move-construction.
|
inline |
move construct from a set with a larger capacity
Participates in overload resolution if Value satisfies is_move_constructible
| OtherCapacity | The maximum capacity of the other set to move from. |
| other | The set to move from |
size()==other.size() other , produced as if via move-construction. other.size()<=maximum_size() else ARENE_PRECONDITION violation.
|
inlinenoexcept |
move construct from a set with a smaller capacity
Participates in overload resolution if Value satisfies is_move_constructible
| OtherCapacity | The maximum capacity of the other set to move from. |
| other | The set to move from |
size()==other.size() other , produced as if via move-construction.
|
inlinenoexcept |
Obtain an iterator referring to the beginning of the sorted range of elements.
end() if empty() .
|
inlinenoexcept |
Obtain an iterator referring to the beginning of the sorted range of elements.
end() if empty() .
|
inlinenoexcept |
Obtain an iterator referring to one past the last element in the sorted range of elements.
|
inlinenoexcept |
|
inlinenoexcept |
Check if the set contains a value equivalent to a specific value.
| OtherKey | the type of the value to find. Must satisfy is_transparent_comparator_for<Compare,Value,K> or is_transparent_three_way_comparator_for<Compare,Value,K> . |
| value | The value to search for |
|
inlinenoexcept |
|
inlinenoexcept |
Return the number of elements in the set equivalent to a specific value.
| OtherKey | the type of the value to find. Must satisfy is_transparent_comparator_for<Compare,Value,K> or is_transparent_three_way_comparator_for<Compare,Value,K> . |
| value | The value to search for. |
0 if the element was not in the set, else 1 .
|
inlinenoexcept |
Return the number of elements in the set equivalent to a specific value.
| value_to_count | The value to search for. |
0 if the element was not in the set, else 1 .
|
inlinenoexcept |
Obtain an iterator referring to the beginning of a reversed traversal of the sorted range of elements.
rend() if empty() .
|
inlinenoexcept |
Obtain an iterator referring to one past the last element in a reversed traversal of the sorted range of elements.
|
inline |
Construct a new element from the specified initialization arguments, and then attempt to insert it.
| ArgTypes | The types of the initialization arguments |
| args | The initialization arguments of the new element |
insert(Value{ArgTypes...}) .
|
inlinenoexcept |
Check if the set is empty.
true if the set does not hold any elements, false otherwise
|
inlinenoexcept |
Obtain an iterator referring to one past the last element in the sorted range of elements.
|
inlinenoexcept |
Gets a reference to the element corrsponding to a given index.
| index | Index of the element in iteration order. |
inline_set internals due to the passkey index<indicies.size()
|
inlinenoexcept |
Gets a reference to the element corrsponding to a given index.
| index | Index of the element in iteration order. |
inline_set internals due to the passkey index<indicies.size()
|
inlinenoexcept |
Finds the sequence of values which compare equivalent to a given value.
| OtherKey | the type of the value to find. Must satisfy is_transparent_comparator_for<Compare,Value,K> or is_transparent_three_way_comparator_for<Compare,Value,K> . |
| value | The value to search for |
[first,second) compare equal to value if there was an element equivalent to value in the set. Otherwise both iterators will be end() .
|
inlinenoexcept |
Finds the sequence of values which compare equivalent to a given value.
| OtherKey | the type of the value to find. Must satisfy is_transparent_comparator_for<Compare,Value,K> or is_transparent_three_way_comparator_for<Compare,Value,K> . |
| value | The value to search for |
[first,second) compare equal to value if there was an element equivalent to value in the set. Otherwise both iterators will be end() .
|
inlinenoexcept |
Finds the sequence of values which compare equivalent to a given value.
| value_to_find | The value to search for |
[first,second) compare equal to value_to_find if there was an element equivalent to value_to_find in the set. Otherwise both iterators will be end() .
|
inlinenoexcept |
Finds the sequence of values which compare equivalent to a given value.
| value_to_find | The value to search for |
[first,second) compare equal to value_to_find if there was an element equivalent to value_to_find in the set. Otherwise both iterators will be end() .
|
inlinenoexcept |
Erase all the elements referred to be the specified iterator range.
| first | The iterator for the start of the range |
| last | The iterator for one-past-the-end of the range |
end() otherwise. (first,last] Must be a valid iterator range into *this
|
inlinenoexcept |
Erase the element referred to be the specified iterator.
| pos | The iterator referring to the element to erase |
end() otherwise. pos Must be a deferencable iterator into *this
|
inlinenoexcept |
Erase any elements with a value equivalent to the supplied element.
| OtherKey | The type of the element to erase. |
| value | The value of elements to erase |
1 if the element was in the set, else 0 .
|
inlinenoexcept |
Erase any elements with a value equivalent to the supplied element.
| value_to_erase | The value of elements to erase |
1 if the element was in the set, else 0 .
|
inlinestaticnoexcept |
Fast inequality heuristic to shortcut on different sized containers.
| OtherCapacity | the capacity of rhs |
| lhs | The left-hand operand to the check |
| rhs | The right-hand operand to the check |
lhs.size()==rhs.size() lhs.size()!=rhs.size()
|
inlinenoexcept |
Obtain an iterator referring to the element equivalent to the supplied value, if there is one.
| OtherKey | the type of the value to find. Must satisfy is_transparent_comparator_for<Compare,Value,K> or is_transparent_three_way_comparator_for<Compare,Value,K> . |
| value | The value to find |
end() if the element is not found
|
inlinenoexcept |
Obtain an iterator referring to the element equivalent to the supplied value, if there is one.
| OtherKey | the type of the value to find. Must satisfy is_transparent_comparator_for<Compare,Value,K> or is_transparent_three_way_comparator_for<Compare,Value,K> . |
| value | The value to find |
end() if the element is not found
|
inlinenoexcept |
Obtain an iterator referring to the element equivalent to the supplied value, if there is one.
| value_to_find | The value to find |
end() if the element is not found
|
inlinenoexcept |
Obtain an iterator referring to the element equivalent to the supplied value, if there is one.
| value_to_find | The value to find |
end() if the element is not found
|
inlinenoexcept |
Get the comparator base.
inline_set internals due to the passkey
|
inlinenoexcept |
Get the comparator base.
inline_set internals due to the passkey
|
inlinenoexcept |
Insert all the elements in the provided iterator range into the set, if there are not already equivalent elements.
| Iterator | The type of the iterators |
| first | The iterator to the first element in the range |
| last | The iterator to the one-past-the-end element in the range |
size() increases by the number of elements in [first,last) which did not already exist in the set. find(*itr) will return an iterator other than end() for all elements in the range [first,last) unique_elements equal the number of elements in the range [first,last) for which contains(*itr) would return false ; size()+unique_elements<=max_size() , else ARENE_PRECONDITION violation .
|
inlinenoexcept |
Attempt to insert an element into the set.
| OtherKey | The type of the element to attempt to insert. Must satisfy std::is_constructible<Value,OtherKey&&> |
| value | The element to insert via perfect forwarding. |
value , and the second element is a boolean which is true if the insertion happened, or false otherwise. size() increases by 1. value in the set at the position referenced by the returned iterator. size()+1<=max_size() , else ARENE_PRECONDITION violation .
|
inline |
Attempt to insert the elements in the provided initializer list into the set.
| init | The list of elements to insert |
size() increases by the number of elements in init which did not already exist in the set. find(*itr) wil return an iterator other than end() for all elements in init unique_elements equal the number of elements in init for which contains() would return false ; size()+unique_elements<=max_size() , else ARENE_PRECONDITION violation .
|
inlinenoexcept |
Attempt to insert an element into the set.
| value_to_insert | The element to insert via move-construction |
value_to_insert , and the second element is a boolean which is true if the insertion happened, or false otherwise. size() increases by 1. value_to_insert in the set at the position referenced by the returned iterator. size()+1<=max_size() , else ARENE_PRECONDITION violation .
|
inlinenoexcept |
Attempt to insert an element into the set.
| value_to_insert | The element to insert via copy-construction |
value_to_insert , and the second element is a boolean which is true if the insertion happened, or false otherwise. size() increases by 1. value_to_insert in the set at the position referenced by the returned iterator. size()+1<=max_size() , else ARENE_PRECONDITION violation .
|
inlinenoexcept |
Get the comparator.
|
inlinenoexcept |
Find the first element which is not less than a given value.
| OtherKey | the type of the value to find. Must satisfy is_transparent_comparator_for<Compare,Value,K> or is_transparent_three_way_comparator_for<Compare,Value,K> . |
| value | The value to find the lower bound for. |
value , or end() if there is no such element.
|
inlinenoexcept |
Find the first element which is not less than a given value.
| OtherKey | the type of the value to find. Must satisfy is_transparent_comparator_for<Compare,Value,K> or is_transparent_three_way_comparator_for<Compare,Value,K> . |
| value | The value to find the lower bound for. |
value , or end() if there is no such element.
|
inlinenoexcept |
Find the first element which is not less than a given value.
| value_to_find | The value to find the lower bound for. |
value_to_find, or end() if there is no such element.
|
inlinenoexcept |
Find the first element which is not less than a given value.
| value_to_find | The value to find the lower bound for. |
value_to_find, or end() if there is no such element.
|
inlinenoexcept |
copy-assignment operator.
Participates in overload resolution if Value satisfies std::is_copy_constructible and Compare satisfies is_copy_assignable
| OtherCapacity | the capacity of the other set. |
| other | The set to copy-assign from. |
size()==other.size() other , produced as if via copy-assignment/construction. other.size()<=maximum_size() else ARENE_PRECONDITION violation.
|
delete |
Deleted copy-assignment operator where the set is not copy-assignable.
|
delete |
The move assignment operator is deleted if move assignment is not supported.
|
inline |
move-assignment operator from an inline_set with a larger capacity
Participates in overload resolution if Value satisfies is_move_constructible, and Compare satisfies std::is_move_assignable
| OtherCapacity | The capacity of the source set |
| other | The set to move-assign from. |
size()==other.size() other , produced as if via move-assignment/construction. other.size()<=maximum_size() else ARENE_PRECONDITION violation.
|
inlinenoexcept |
move-assignment operator from an inline_set with a smaller capacity
Participates in overload resolution if Value satisfies is_move_constructible, and Compare satisfies std::is_move_assignable
| OtherCapacity | The capacity of the source set |
| other | The set to move-assign from. |
size()==other.size() other , produced as if via move-assignment/construction.
|
inlinenoexcept |
copy-assignment operator for copying from a set with a smaller capacity
Participates in overload resolution if Value satisfies std::is_copy_constructible and Compare satisfies is_copy_assignable
| OtherCapacity | the capacity of the other set. |
| other | The set to copy-assign from. |
size()==other.size() other , produced as if via copy-assignment/construction.
|
inlinenoexcept |
copy-assignment operator for copying from a set with a larger capacity
Participates in overload resolution if Value satisfies std::is_copy_constructible and Compare satisfies is_copy_assignable
| OtherCapacity | the capacity of the other set. |
| other | The set to copy-assign from. |
size()==other.size() other , produced as if via copy-assignment/construction. other.size()<=maximum_size() else ARENE_PRECONDITION violation.
|
inlinenoexcept |
move-assignment operator
Participates in overload resolution if Value satisfies is_move_constructible, and Compare satisfies std::is_move_assignable
| other | The set to move-assign from. |
size()==other.size() other , produced as if via move-assignment/construction. other.size()<=maximum_size() else ARENE_PRECONDITION violation.
|
inlinenoexcept |
Obtain an iterator referring to the beginning of a reversed traversal of the sorted range of elements.
rend() if empty() .
|
inlinenoexcept |
Obtain an iterator referring to one past the last element in a reversed traversal of the sorted range of elements.
|
inlinenoexcept |
Get the number of elements in the set.
|
inlinestaticnoexcept |
Compares two sets lexicographically .
Compare . That is, it is a lexicographic comparison between the value_type elements of each container, in iteration order, using the standard compare_three_way facility. This means that for all possible sets which result in element sequences {1, 2, 3} and {1, 2, 5}, when compared against each other the result of the comparison will always be the same, strong_ordering::less.| OtherCapacity | the capacity of rhs |
| SfinaeKey | dummy template parameter to disable the operator if key_Type is not three way comparable. |
| lhs | The left hand operand to the comparison. |
| rhs | The right hand operand to the comparison. |
arene::base::lexicographical_compare_three_way(lhs.begin(),lhs.end(),rhs.begin(),rhs.end())
|
inlinestaticnoexcept |
Attempts to construct a set via move-construction from a set with a larger capacity.
| OtherCapacity | The capacity of the other set |
| other | The set to move from. |
other.size()<=Capacity , then will return a populated optional equivalent to inline_set{other} . Otherwise returns a null optional.
|
inlinestaticnoexcept |
Attempts to construct a set via move-construction from a set with a capacity that is less than or equal to the target capacity.
| OtherCapacity | The capacity of the other set |
| other | The set to move from. |
inline_set{other} .
|
inlinestaticnoexcept |
Attempts to construct a set via copy-construction from a set with the same or smaller capacity.
| OtherCapacity | The capacity of the other set |
| other | The set to copy from. |
inline_set{other}
|
inlinestaticnoexcept |
Attempts to construct a set from a set with a larger capacity.
| OtherCapacity | The capacity of the other set |
| other | The set to copy from. |
other.size()<=Capacity , then will return a populated optional equivalent to inline_set{other} . Otherwise returns a null optional.
|
inlinestaticnoexcept |
Attempt to construct a set from the specified sequence of values.
| Iterator | The type of the iterators. Must satisfy std::is_constructible<Value,std::iterator_traits<Iterator>::reference> . |
| first | The iterator to the first element in the range |
| last | The iterator to the one-past-the-end element in the range |
[first,last) is less than or equal to Capacity , then will return a populated optional equivalent to inline_set{first,last} . Otherwise returns a null optional.
|
inlinestaticnoexcept |
Attempt to construct a set from the specified sequence of values and a comparator.
| Iterator | The type of the iterators. Must satisfy std::is_constructible<Value,std::iterator_traits<Iterator>::reference> . |
| first | The iterator to the first element in the range |
| last | The iterator to the one-past-the-end element in the range |
| comp | The comparator to use . |
[first,last) is less than or equal to Capacity , then will return a populated optional equivalent to inline_set{first,last} . Otherwise returns a null optional.
|
inlinestaticnoexcept |
Attempt to construct a set from the specified list of values.
| init | The list of elements to store in the set |
init is less than or equal to Capacity , then will return a populated optional equivalent to inline_set{init} . Otherwise returns a null optional.
|
inlinestaticnoexcept |
Attempt to construct a set from the specified list of values and a comparator.
| init | The list of elements to store in the set |
| comp | The comparator to use. |
init is less than or equal to Capacity , then will return a populated optional equivalent to inline_set{init,comp} . Otherwise returns a null optional.
|
inlinenoexcept |
Find the first element which is greater than a given value.
| OtherKey | the type of the value to find. Must satisfy is_transparent_comparator_for<Compare,Value,K> or is_transparent_three_way_comparator_for<Compare,Value,K> . |
| value | The value to search for. |
value , or end() if there is no such element.
|
inlinenoexcept |
Find the first element which is greater than a given value.
| OtherKey | the type of the value to find. Must satisfy is_transparent_comparator_for<Compare,Value,K> or is_transparent_three_way_comparator_for<Compare,Value,K> . |
| value | The value to search for. |
value , or end() if there is no such element.
|
inlinenoexcept |
Find the first element which is greater than a given value.
| value_to_find | The value to search for. |
value_to_find , or end() if there is no such element.
|
inlinenoexcept |
Find the first element which is greater than a given value.
| value_to_find | The value to search for. |
value_to_find , or end() if there is no such element.
|
inlinenoexcept |
Get the comparator.
|
staticconstexpr |
The maximum number of elements that can be held in the set.
Capacity .
|
staticconstexpr |
Get the maximum number of elements in the set.
Capacity .