std::uppercase

Defined in header <ios> std::ios_base& uppercase( std::ios_base& str ); (1) std::ios_base& nouppercase( std::ios_base& str ); (2) Enables the use of uppercase characters in floating-point and hexadecimal integer output. Has no effect on input. 1) enables the uppercase flag in the stream str as if by calling str.setf(std::ios_base::uppercase). 2) disables the uppercase flag in the stream str as if by calling str.unsetf(std::ios_base::uppercase). This is

std::upper_bound

Defined in header <algorithm> template< class ForwardIt, class T > ForwardIt upper_bound( ForwardIt first, ForwardIt last, const T& value ); (1) template< class ForwardIt, class T, class Compare > ForwardIt upper_bound( ForwardIt first, ForwardIt last, const T& value, Compare comp ); (2) Returns an iterator pointing to the first element in the range [first, last) that is greater than value. The range [first, last) must be at least partially ordered

std::unordered_set::unordered_set

(1) explicit unordered_set( size_type bucket_count = /*implementation-defined*/, const Hash& hash = Hash(), const KeyEqual& equal = KeyEqual(), const Allocator& alloc = Allocator() ); (since C++11) (until C++14) unordered_set() : unordered_set( size_type(/*implementation-defined*/) {} explicit unordered_set( size_type bucket_count, const Hash& hash = Hash(),

std::unordered_set::reserve

void reserve( size_type count ); (since C++11) Sets the number of buckets to the number needed to accomodate at least count elements without exceeding maximum load factor and rehashes the container, i.e. puts the elements into appropriate buckets considering that total number of buckets has changed. Effectively calls rehash(std::ceil(count / max_load_factor())). Parameters count - new capacity of the container Return value (none). Complexity Average case linear in the s

std::unordered_set::rehash

void rehash( size_type count ); (since C++11) Sets the number of buckets to count and rehashes the container, i.e. puts the elements into appropriate buckets considering that total number of buckets has changed. If the new number of buckets makes load factor more than maximum load factor (count < size() / max_load_factor()), then the new number of buckets is at least size() / max_load_factor(). Parameters count - new number of buckets Return value (none). Complexity

std::unordered_set::swap

void swap( unordered_set& other ); (since C++11) 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 Hash and KeyEqual objects must be Swappable, and they are exchanged using unqualified calls to non-member swap. If std::allocator_traits<allocator_type>::propagate_on_container_swap::value is true, then the

std::unordered_set::max_size

size_type max_size() const; (since C++11) 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 noexcept specification: noexcept Complexity Constant. Notes This value is typically equal to std::numeric_limits<size_type>::max(), and reflects the theoretical limit on t

std::unordered_set::size

size_type size() const; (since C++11) 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 noexcept specification: noexcept Complexity Constant. Example The following code uses size to display the number of elements in a std::unordered_set<int>: #include <unordered_set> #include <iostream> int main() { std::unordered_set<int>

std::unordered_set::key_eq

key_equal key_eq() const; (since C++11) Returns the function that compares keys for equality. Parameters (none). Return value The key comparison function. Complexity Constant. See also hash_function returns function used to hash the keys (public member function)

std::unordered_set::load_factor

float load_factor() const; (since C++11) Returns the average number of elements per bucket. Parameters (none). Return value Average number of elements per bucket. Complexity Constant. See also max_load_factor manages maximum average number of elements per bucket (public member function)