Utility library

From Cppreference

< cpp
Jump to: navigation, search

Contents

[edit] Language support

[edit] Type support (basic types, RTTI, type traits)

[edit] Dynamic memory management

[edit] Error handling

[edit] Initializer lists

initializer_list (C++11)
Allows to use initializer list syntax to initialize non Plain-old-data types
(class template)

[edit] General utilities

[edit] Program utilities

[edit] Compile time rational arithmetic (C++11 feature)

[edit] Date and time

[edit] Bitset

bitset
implements constant length bit array
(class)

[edit] Function objects

[edit] Pairs and tuples

pair
implements binary tuple, i.e. a pair of values
(class template)
tuple (C++11)
implements fixed size container, which holds elements of possibly different types
(class template)
piecewise_construct_t (C++11)
tag type used to select correct function overload for piecewise construction
(class)
piecewise_construct (C++11)
an object of type piecewise_construct_t used to disambiguate functions for piecewise construction
(constant)

[edit] Swap, forward and move

swap
swaps the values of two objects
(function template)
forward (C++11)
forwards a function argument
(function template)
move (C++11)
obtains an rvalue reference
(function template)
move_if_noexcept (C++11)
obtains an rvalue reference if the move constructor does not throw
(function template)
declval (C++11)
obtains the type of expression in unevaluated context
(function template)

[edit] Relational operators

Defined in namespace std::rel_ops
operator!=
automatically generated operator!= based on user-defined operator==
(function template)
opreator>
automatically generated operator> based on user-defined operator<
(function template)
operator<=
automatically generated operator<= based on user-defined operator<
(function template)
operator>=
automatically generated operator<= based on user-defined operator<
(function template)

[edit] Hash support

hash (C++11)
hash function object
(class template)