Header | Contents |
---|---|
<cmath>
|
Math functions, such as
exp()
,
sqrt()
,
log()
,
abs()
, all trigonometric functions, and more.
|
<cstdint>
|
A set of
typedef
s for integral types with certain width requirements: for example,
int32_t
and
int_fast64_t
.
|
<limits>
|
numeric_limits
, offering properties—such as
min()
,
max()
,
lowest()
,
infinity()
,
quiet_NaN()
, and so on—for all built-in arithmetic types.
|
<climits>
|
Macros for C-style limits of integral types, such as
INT_MAX
. Subsumed by
<limits>
.
|
<cfloat>
|
Macros to describe details of the floating-point types of your environment, e.g.
FLT_EPSILON
,
FLT_MAX
, and so on. Subsumed by
<limits>
.
|
<cfenv>
|
Advanced access to the floating-point environment to configure floating-point exceptions, rounding, and other environment settings.
|
<complex>
|
The
complex
class for working with complex numbers.
|
<ccomplex>
|
Simply includes
<complex>
.
|
<ctgmath>
|
Includes
<cmath>
and
<ccomplex>
.
|
<ratio>
|
The
ratio
template, helper templates for performing arithmetic operations and comparisons on them, and a set of predefined
ratio
s.
|
<random>
|
Pseudo-random number generators,
random_device
, and various random number distributions.
|
<valarray>
|
valarray
functionality for working with arrays of numeric values.
|
Header | Contents |
---|---|
<utility>
|
pair
and
piecewise_construct
. Functions
make_pair()
,
swap()
,
forward()
,
move()
,
move_if_noexcept()
, and
declval()
.
|
<tuple>
|
tuple
, helper classes
tuple_size
and
tuple_element
, and functions
make_tuple()
,
forward_as_tuple()
,
tie()
,
tuple_cat()
, and
get()
.
|
<memory>
|
Smart pointers:
unique_ptr
,
shared_ptr
, and
weak_ptr
.
Default allocators.
|
<new>
|
Functions for managing dynamic storage: operators
new
,
new[]
,
delete
, and
delete[]
,
get_
and
set_new_handler()
, and exceptions
bad_alloc
and
bad_array_new_length
.
|
<functional>
|
Reference wrappers (created with
ref()
/
cref()
), predefined functors (function objects), functor negators,
std::function
,
bind()
, and
mem_fn()
.
|
<initializer_list>
|
The definition of
initializer_list
.
|
<chrono>
|
Time utilities:
duration
s,
time_point
s, and clocks (
steady_clock
,
system_clock
, and
high_resolution_clock
).
|
<ctime>
|
C-style time and date utilities such as the
tm struct
,
time()
,
localtime()
, and
strftime()
.
|
<cstdio>
|
C-style file utilities:
remove()
,
rename()
,
tmpfile()
, and
tmpnam()
. Also provides C-style stream I/O functionality: see Chapter
5
.
|
<typeinfo>
|
type_info
, and the exceptions
bad_cast
and
bad_typeid
.
|
<typeindex>
|
type_index
, a wrapper for
type_info
to be able to use it as a key in associative containers.
|
<type_traits>
|
Template-based type traits for compile-time manipulation and inspection of properties of types.
|
Header | Contents |
---|---|
<iterator>
|
Functions to perform operations on iterators:
advance()
,
distance()
,
begin()
,
end()
,
prev()
, and
next()
, and the iterator tags. Chapter
4
discusses input/output iterators and the predefined iterator adaptors:
reverse_iterator
,
move_iterator
, and insert iterators. Stream iterators are discussed in Chapter
5
.
|
<vector>
|
The
vector
class template and the
vector<bool>
specialization.
|
<deque>
|
The
deque
class template.
|
<array>
|
The
array
class template.
|
<list>
|
The
list
class template.
|
<forward_list>
|
The
forward_list
class template.
|
<bitset>
|
The
bitset
class template.
|
<queue>
|
The
queue
and
priority_queue
class templates.
|
<stack>
|
The
stack
class template.
|
<map>
|
The
map
and
multimap
class templates.
|
<set>
|
The
set
and
multiset
class templates.
|
<unordered_map>
|
The
unordered_map
and
unordered_multimap
class templates.
|
<unordered_set>
|
The
unordered_set
and
unordered_multiset
class templates.
|
Header | Contents |
---|---|
<algorithm>
|
All available algorithms, except those that are in
<numeric>
.
|
<numeric>
|
Numerical algorithms:
accumulate()
,
adjacent_difference()
,
inner_product()
,
partial_sum()
, and
iota()
.
|
Header | Contents |
---|---|
<ios>
|
ios_base
,
basic_ios
, and
fpos
,
typedef
s
ios
and
wios
, and types
streamoff
,
streampos
,
wstreampos
, and
streamsize
. Non-parametric I/O manipulators such as
boolalpha
,
dec
,
scientific
, and so on.
|
<iomanip>
|
Parametric I/O manipulators such as
setbase()
,
setfill()
,
get_money()
,
put_time()
, and more.
|
<ostream>
|
basic_ostream
, and
typedef
s
ostream
and
wostream
. The
endl
,
ends
, and
flush
output manipulators.
|
<istream>
|
basic_istream
and
basic_iostream
, and
typedef
s
istream
,
wistream
,
iostream
, and
wiostream
. The
ws
input manipulator.
|
<iostream>
|
cin
/
wcin
,
cout
/
wcout
,
cerr
/
wcerr
, and
clog
/
wclog
. Includes
<ios>
,
<streambuf>
,
<istream>
,
<ostream>
, and
<iosfwd>
.
|
<sstream>
|
String streams:
basic_istringstream
,
basic_ostringstream
,
basic_stringstream
,
basic_stringbuf
, and related
typedef
s.
|
<fstream>
|
File streams:
basic_ifstream
,
basic_ofstream
,
basic_fstream
, and
basic_filebuf
, and related
typedef
s.
|
<streambuf>
|
basic_streambuf
, and
typedef
s
streambuf
and
wstreambuf
.
|
<iosfwd>
| Forward declarations for all stream I/O types. |
<cstdio>
|
The C-style I/O library. Basic file utilities (see Chapter
2
)
, plus
fopen()
,
fclose()
, and so on.
Functions for formatted (
printf()
,
scanf()
, and so on
)
and character-based I/O (
getc()
,
putc()
, and so on
). It is generally recommended that you use C++ I/O streams.
|
<cinttypes>
|
Macros to use with
printf()
and
scanf()
to handle the fixed-width integer types of
<cstdint>
. Subsumed by C++ I/O streams.
|
<strstream>
|
Deprecated.
|
Header | Contents |
---|---|
<string>
|
basic_string
, and
typedef
s
string
,
wstring
,
u16string
, and
u32string
. Conversion functions such as
stoi()
,
stof()
,
to_string()
, and so on.
|
<cstring>
|
Low-level memory functions:
memcpy()
,
memmove()
,
memcmp()
,
memchr()
, and
memset()
. A collection of C-style string functions, e.g.
strcpy()
and
strcat()
, and a definition for
NULL
and
size_t
.
|
<cwchar>
|
Functions to work with C-style wide character strings, such as
fputws()
,
wprintf()
,
wcstof()
,
wcscat()
,
wmemset()
, and so on.
|
<cctype>
|
Functions to classify and transform characters:
isdigit()
,
isspace()
,
tolower()
,
toupper()
, and so on.
|
<cwctype>
|
Wide character versions of functions from
<cctype>
:
iswdigit()
,
iswspace()
,
towlower()
,
towupper()
, and so on.
|
<codecvt>
|
Unicode character encoding conversion facets:
codecvt_utf8
,
codecvt_utf16
, and
codecvt_utf8_utf16
.
|
<cuchar>
|
Functions to convert between 16 or 32-bit character and multibyte sequences:
c16rtomb()
,
c32rtomb()
,
mbrtoc16()
, and
mbrtoc32()
.
|
<locale>
|
The
locale
class, overloads of
<cctype>
functions accepting a given
locale
, facet functions
use_facet()
and
has_facet()
, and standard facet classes
num_get
,
collate
,
money_put
,
codecvt
, and so on.
|
<clocale>
|
lconv
and the
setlocale()
and
localeconv()
functions.
setlocale()
only changes the C locale.
|
<regex>
|
Everything related to regular expressions.
|
Header | Contents |
---|---|
<thread>
|
The
thread
class and the
this_thread
namespace.
|
<future>
|
future
and
shared_future
,
future_error
, and providers
promise
,
packaged_task
, and
async()
.
|
<mutex>
|
mutex
,
recursive_mutex
,
timed_mutex
,
recursive_timed_mutex
,
lock_guard
,
unique_lock
, and related types. Functions
try_lock()
,
lock()
, and
call_once()
.
|
<shared_mutex>
|
shared_mutex
,
shared_timed_mutex
, and
shared_lock
.
|
<condition_variable>
|
condition_variable
and
condition_variable_any
, and the function
notify_all_at_thread_exit()
.
|
<atomic>
| Atomic types and fences. |
Header | Contents |
---|---|
<cassert>
|
The
assert()
macro.
|
<exception>
|
exception
and
bad_exception
, exception pointers, nested exceptions, terminate, and unexpected handlers.
|
<stdexcept>
|
Exception classes for reporting common errors:
logic_error
,
runtime_error
, and their generic subclasses.
|
<system_error>
|
The
std::system_error
exception used to report low-level errors, and the concepts of error codes, conditions, and categories.
|
<cerrno>
|
The
errno
expression and default error-condition values.
|
Header | Contents |
---|---|
<ciso646>
|
Only useful for C. Defines macros such as
and
,
or
,
not
, and so on. In C++, those are reserved words, so this header is empty.
|
<csetjmp>
|
longjmp()
and
setjmp()
. Do not use these in C++.
|
<csignal>
|
signal()
and
raise()
. Do not use these in C++.
|
<cstdalign>
|
The
__alignas_is_defined
macro: always expands to 1 for C++.
|
<cstdarg>
|
The
va_list
type and functions
va_start()
,
va_arg()
,
va_end()
, and
va_copy()
to handle variable-length argument lists. In C++, it is recommended that you use type-safe variadic templates instead.
|
<cstdbool>
|
The
__bool_true_false_are_defined
macro: expands to 1 for C++.
|
<cstddef>
|
Types
ptrdiff_t
,
size_t
,
max_align_t
, and
nullptr_t
. The macro
offsetof()
and the constant
NULL
.
|
<cstdlib>
|
String conversion functions:
atof()
,
strtof()
, and so on.
Multibyte character functions:
mblen()
,
mbtowc()
, and
wctomb()
.
Multibyte string conversion:
mbstowcs()
and
wcstombs()
.
Searching and sorting:
bsearch()
and
qsort()
(use
<algorithm>
).
Random numbers:
rand()
and
srand()
(deprecated; use
<random>
).
Memory management:
calloc()
,
free()
,
malloc()
, and
realloc()
.
Integer functions:
abs()
,
div(
),
labs()
,
ldiv()
,
llabs()
, and
lldiv()
.
Functions
abort()
,
atexit()
,
at_quick_exit()
,
exit()
,
getenv()
,
quick_exit()
,
system()
, and
_Exit()
.
|