A standard container made up of unique keys, which can be retrieved in logarithmic time.
Class set<_Key, _Compare, _Alloc>
#include <Geode/c++stl/gnustl/stl_set.h>
_Key
_Compare
_Alloc
Examples0
Public static methods0
Public member functions43
template<typename _InputIterator>voidset<_Key, _Compare, _Alloc>(_InputIterator__first,_InputIterator__last)
Builds a %set from a range.
__first
__last
template<typename _InputIterator>voidset<_Key, _Compare, _Alloc>(_InputIterator__first,_InputIterator__last,const _Compareconst&__comp,)
Builds a %set from a range.
__first
__last
__comp
__a
template<typename _InputIterator>voidset<_Key, _Compare, _Alloc>(_InputIterator__first,_InputIterator__last,)
/// Allocator-extended range constructor.
geode::stl::set&operator=()
%Set assignment operator.
__x
geode::stl::set&operator=()
/// Move assignment operator.
geode::stl::set&operator=()
%Set list assignment operator.
__l
geode::stl::set::key_comparekey_comp()const
/// Returns the comparison object with which the %set was constructed.
geode::stl::set::value_comparevalue_comp()const
/// Returns the comparison object with which the %set was constructed.
geode::stl::set::allocator_typeget_allocator()const
/// Returns the allocator object with which the %set was constructed.
geode::stl::set::iteratorbegin()const
Returns a read-only (constant) iterator that points to the first element in the %set. Iteration is done in ascending order according to the keys.
geode::stl::set::iteratorend()const
Returns a read-only (constant) iterator that points one past the last element in the %set. Iteration is done in ascending order according to the keys.
geode::stl::set::reverse_iteratorrbegin()const
Returns a read-only (constant) iterator that points to the last element in the %set. Iteration is done in descending order according to the keys.
geode::stl::set::reverse_iteratorrend()const
Returns a read-only (constant) reverse iterator that points to the last pair in the %set. Iteration is done in descending order according to the keys.
geode::stl::set::iteratorcbegin()const
Returns a read-only (constant) iterator that points to the first element in the %set. Iteration is done in ascending order according to the keys.
geode::stl::set::iteratorcend()const
Returns a read-only (constant) iterator that points one past the last element in the %set. Iteration is done in ascending order according to the keys.
geode::stl::set::reverse_iteratorcrbegin()const
Returns a read-only (constant) iterator that points to the last element in the %set. Iteration is done in descending order according to the keys.
geode::stl::set::reverse_iteratorcrend()const
Returns a read-only (constant) reverse iterator that points to the last pair in the %set. Iteration is done in descending order according to the keys.
boolempty()const
/// Returns true if the %set is empty.
geode::stl::set::size_typesize()const
/// Returns the size of the %set.
geode::stl::set::size_typemax_size()const
/// Returns the maximum size of the %set.
voidswap()
Swaps data with another %set.
__x
template<typename... _Args>std::pair<geode::stl::set::iterator,bool>emplace(_Args &&...__args)
Attempts to build and insert an element into the %set.
__args
template<typename... _Args>geode::stl::set::iteratoremplace_hint(,_Args &&...__args)
Attempts to insert an element into the %set.
__pos
__args
std::pair<geode::stl::set::iterator,bool>insert()
Attempts to insert an element into the %set.
__x
std::pair<geode::stl::set::iterator,bool>insert()
geode::stl::set::iteratorinsert(geode::stl::set::const_iterator__position,)
Attempts to insert an element into the %set.
__position
__x
geode::stl::set::iteratorinsert(geode::stl::set::const_iterator__position,)
template<typename _InputIterator>voidinsert(_InputIterator__first,_InputIterator__last)
A template function that attempts to insert a range of elements.
__first
__last
voidinsert()
Attempts to insert a list of elements into the %set.
__l
geode::stl::set::iteratorerase(geode::stl::set::const_iterator__position)
Erases an element from a %set.
__position
geode::stl::set::size_typeerase()
Erases elements according to the provided key.
__x
geode::stl::set::iteratorerase(,)
Erases a [__first,__last) range of elements from a %set.
__first
__last
voidclear()
Erases all elements in a %set. Note that this function only erases the elements, and that if the elements themselves are pointers, the pointed-to memory is not touched in any way. Managing the pointer is the user’s responsibility.
geode::stl::set::size_typecount()const
Finds the number of elements.
__x
geode::stl::set::iteratorfind()
Tries to locate an element in a %set.
__x
geode::stl::set::const_iteratorfind()const
boolcontains()const
Check if the set contains an element.
__x
ℹ Geode addition.
geode::stl::set::iteratorlower_bound()
Finds the beginning of a subsequence matching given key.
__x
geode::stl::set::const_iteratorlower_bound()const
geode::stl::set::iteratorupper_bound()
Finds the end of a subsequence matching given key.
__x
geode::stl::set::const_iteratorupper_bound()const
std::pair<geode::stl::set::iterator,geode::stl::set::iterator>equal_range()
Finds a subsequence matching given key.
__x
std::make_pair(c.lower_bound(val),
c.upper_bound(val))