std::set::value_comp

std::set::value_compare value_comp() const; Returns the function object that compares the values. It is the same as key_comp. Parameters (none). Return value The value comparison function object. Complexity Constant. See also key_comp returns the function that compares keys (public member function)

std::setbase

Defined in header <iomanip> /*unspecified*/ setbase( int base ); Sets the numeric base of the stream. When used in an expression out << setbase(base) or in >> setbase(base), changes the basefield flag of the stream out or in, depending on the value of base: the value 16 sets basefield to std::ios_base::hex the value 8 sets std::ios_base::oct the value 10 sets std::ios_base::dec. Values of base other than 8, 10, or 16 reset basefield to zero, which corres

std::set::swap

void swap( set& other ); Exchanges the contents of the container with those of other. Does not invoke any move, copy, or swap operations on individual elements. All iterators and references remain valid. The past-the-end iterator is invalidated. The Pred objects must be Swappable, and they are exchanged using unqualified call to non-member swap. If std::allocator_traits<allocator_type>::propagate_on_container_swap::value is true, then the allocators are exchanged using an unq

std::set::size

size_type size() const; Returns the number of elements in the container, i.e. std::distance(begin(), end()). Parameters (none). Return value The number of elements in the container. Exceptions (none) (until C++11) noexcept specification: noexcept (since C++11) Complexity Constant. Example The following code uses size to display the number of elements in a std::set<int>: #include <set> #include <iostream> int main() { std::set<int> nums

std::set::max_size

size_type max_size() const; Returns the maximum number of elements the container is able to hold due to system or library implementation limitations, i.e. std::distance(begin(), end()) for the largest container. Parameters (none). Return value Maximum number of elements. Exceptions (none) (until C++11) noexcept specification: noexcept (since C++11) Complexity Constant. Notes This value is typically equal to std::numeric_limits<size_type>::max(), and reflects the

std::set::lower_bound

iterator lower_bound( const Key& key ); (1) const_iterator lower_bound( const Key& key ) const; (1) template< class K > iterator lower_bound(const K& x); (2) (since C++14) template< class K > const_iterator lower_bound(const K& x) const; (2) (since C++14) 1) Returns an iterator pointing to the first element that is not less than key. 2) Returns an iterator pointing to the first element that compares not less to the value x. This overload

std::set::rbegin

reverse_iterator rbegin(); const_reverse_iterator rbegin() const; const_reverse_iterator crbegin() const; (since C++11) Returns a reverse iterator to the first element of the reversed container. It corresponds to the last element of the non-reversed container. Parameters (none). Return value Reverse iterator to the first element. Exceptions (none) (until C++11) noexcept specification: noexcept (since C++11) Complexity Constant. See also rend crend r

std::set::rend

reverse_iterator rend(); const_reverse_iterator rend() const; const_reverse_iterator crend() const; (since C++11) Returns a reverse iterator to the element following the last element of the reversed container. It corresponds to the element preceding the first element of the non-reversed container. This element acts as a placeholder, attempting to access it results in undefined behavior. Parameters (none). Return value Reverse iterator to the element following the last

std::set::set

(1) explicit set( const Compare& comp = Compare(), const Allocator& alloc = Allocator() ); (until C++14) set() : set( Compare() ) {} explicit set( const Compare& comp, const Allocator& alloc = Allocator() ); (since C++14) explicit set( const Allocator& alloc ); (1) (since C++11) (2) template< class InputIt > set( InputIt first, InputIt last, const Compare& comp = Compare(), const Allocator& alloc = Al

std::set::get_allocator

allocator_type get_allocator() const; Returns the allocator associated with the container. Parameters (none). Return value The associated allocator. Complexity Constant.