Namespaces
Variants
Views
Actions

C++ Standard Library headers

From cppreference.com
< cpp
Revision as of 06:28, 20 April 2020 by Fruderica (Talk | contribs)

 
 
Standard library headers
 

The interface of C++ standard library is defined by the following collection of headers.

Contents

Concepts library

Fundamental library concepts[edit]

Coroutines library

Coroutine support library[edit]

Utilities library

General purpose utilities: program control, dynamic memory allocation, random numbers, sort and search[edit]
Functions and macro constants for signal management[edit]
Macro (and function) that saves (and jumps) to an execution context[edit]
Handling of variable length argument lists[edit]
Runtime type information utilities[edit]
std::type_index[edit]
Compile-time type information utilities[edit]
std::bitset class template[edit]
Function objects, Function invocations, Bind operations and Reference wrappers[edit]
Various utility components[edit]
C-style time/date utilities[edit]
(C++11)
C++ time utilities[edit]
Standard macros and typedefs[edit]
std::initializer_list class template[edit]
(C++11)
std::tuple class template[edit]
(C++17)
std::any class[edit]
std::optional class template[edit]
(C++17)
std::variant class template[edit]
(C++20)
Three-way comparison operator support[edit]
(C++20)
Supplies macros for verifying implementation status of library[edit]
Supplies means to obtain source code location[edit]
Dynamic memory management
Low-level memory management utilities[edit]
High-level memory management utilities[edit]
Nested allocator class[edit]
Polymorphic allocators and memory resources[edit]
Numeric limits
Limits of integral types[edit]
Limits of floating-point types[edit]
(C++11)
Fixed-width integer types and limits of other types[edit]
Formatting macros, intmax_t and uintmax_t math and conversions[edit]
Query properties of arithmetic types[edit]
Error handling
Exception handling utilities[edit]
Standard exception types[edit]
Conditionally compiled macro that compares its argument to zero[edit]
Defines std::error_code, a platform-dependent error code[edit]
Macro containing the last error number[edit]

Strings library

Functions to determine the category of narrow characters[edit]
Functions to determine the category of wide characters[edit]
Various narrow character string handling functions[edit]
Various wide and multibyte string handling functions[edit]
(C++11)
C-style Unicode character conversion functions[edit]
std::basic_string class template[edit]
std::basic_string_view class template[edit]
std::to_chars and std::from_chars[edit]
(C++20)
Formatting library including std::format[edit]

Containers library

(C++11)
std::array container[edit]
std::vector container[edit]
std::deque container[edit]
std::list container[edit]
std::forward_list container[edit]
std::set and std::multiset associative containers[edit]
std::map and std::multimap associative containers[edit]
std::unordered_set and std::unordered_multiset unordered associative containers[edit]
std::unordered_map and std::unordered_multimap unordered associative containers[edit]
std::stack container adaptor[edit]
std::queue and std::priority_queue container adaptors[edit]
(C++20)
std::span view[edit]

Iterators library

Range iterators[edit]

Ranges library

(C++20)
Range access, primitives, requirements, utilities and adaptors[edit]

Algorithms library

Algorithms that operate on ranges[edit]
Predefined execution policies for parallel versions of the algorithms and execution control components(since C++26)[edit]

Numerics library

Common mathematics functions[edit]
Complex number type[edit]
Class for representing and manipulating arrays of values[edit]
(C++11)
Random number generators and distributions[edit]
Numeric operations on values in ranges[edit]
(C++11)
Compile-time rational arithmetic[edit]
(C++11)
Floating-point environment access functions[edit]
(C++20)
Bit manipulation functions[edit]
(C++20)
Math constants[edit]

Localization library

Localization utilities[edit]
C localization utilities[edit]
(C++11)(deprecated in C++17)(removed in C++26)
Unicode conversion facilities[edit]

Input/output library

Forward declarations of all classes in the input/output library[edit]
std::ios_base class, std::basic_ios class template and typedefs[edit]
std::basic_istream class template and typedefs[edit]
std::basic_ostream, std::basic_iostream class templates and typedefs[edit]
Several standard stream objects[edit]
std::basic_fstream, std::basic_ifstream, std::basic_ofstream class templates and typedefs[edit]
std::basic_stringstream, std::basic_istringstream, std::basic_ostringstream class templates and typedefs[edit]
std::basic_osyncstream, std::basic_syncbuf and typedefs[edit]
(deprecated in C++98)(removed in C++26)
std::strstream, std::istrstream, std::ostrstream[edit]
Helper functions to control the format of input and output[edit]
std::basic_streambuf class template[edit]
C-style input-output functions[edit]

Filesystem library

std::filesystem::path class and supporting functions[edit]

Regular Expressions library

(C++11)
Classes, algorithms and iterators to support regular expression processing[edit]

Atomic Operations library

(C++11)
Atomic operations library[edit]

Thread support library

(C++11)
std::thread class and supporting functions[edit]
Stop tokens for std::jthread[edit]
(C++11)
Mutual exclusion primitives[edit]
Shared mutual exclusion primitives[edit]
(C++11)
Primitives for asynchronous computations[edit]
Thread waiting conditions[edit]
Semaphores[edit]
(C++20)
Latches[edit]
(C++20)
Barriers[edit]

C compatibility headers

For some of the C standard library headers of the form xxx.h, the C++ standard library both includes an identically-named header and another header of the form cxxx (all meaningful cxxx headers are listed above).

With the exception of complex.h, each xxx.h header included in the C++ standard library places in the global namespace each name that the corresponding cxxx header would have placed in the std namespace.

These headers are allowed to also declare the same names in the std namespace, and the corresponding cxxx headers are allowed to also declare the same names in the global namespace: including <cstdlib> definitely provides std::malloc and may also provide ::malloc. Including <stdlib.h> definitely provides ::malloc and may also provide std::malloc. This applies even to functions and function overloads that are not part of C standard library.

Behaves same as <cassert>[edit]
Behaves as if each name from <cctype> is placed in global namespace[edit]
Behaves same as <cerrno>[edit]
(C++11)
Behaves as if each name from <cfenv> is placed in global namespace[edit]
Behaves same as <cfloat>[edit]
Behaves as if each name from <cinttypes> is placed in global namespace[edit]
Behaves same as <climits>[edit]
Behaves as if each name from <clocale> is placed in global namespace[edit]
Behaves as if each name from <cmath> is placed in global namespace,
except for names of mathematical special functions[edit]
Behaves as if each name from <csetjmp> is placed in global namespace[edit]
Behaves as if each name from <csignal> is placed in global namespace[edit]
Behaves as if each name from <cstdarg> is placed in global namespace[edit]
Behaves as if each name from <cstddef> is placed in global namespace,
except for names of std::byte and related functions[edit]
Behaves as if each name from <cstdint> is placed in global namespace[edit]
Behaves as if each name from <cstdio> is placed in global namespace[edit]
Behaves as if each name from <cstdlib> is placed in global namespace[edit]
Behaves as if each name from <cstring> is placed in global namespace[edit]
Behaves as if each name from <ctime> is placed in global namespace[edit]
(C++11)
Behaves as if each name from <cuchar> is placed in global namespace[edit]
Behaves as if each name from <cwchar> is placed in global namespace[edit]
Behaves as if each name from <cwctype> is placed in global namespace[edit]

Empty C headers

The headers <complex.h>, <ccomplex>, <tgmath.h>, and <ctgmath> do not contain any content from the C standard library and instead merely include other headers from the C++ standard library. The use of all these headers is deprecated in C++.

(C++11)(deprecated in C++17)(removed in C++20)
Simply includes the header <complex>[edit]
Simply includes the header <complex>[edit]
(C++11)(deprecated in C++17)(removed in C++20)
Simply includes the headers <complex> and <cmath>: the overloads equivalent to the contents of the C header tgmath.h are already provided by those headers[edit]
Simply includes the headers <complex> and <cmath>[edit]

Meaningless C headers

The headers <ciso646>, <cstdalign>, and <cstdbool> are meaningless in C++ because the macros they provide in C are language keywords in C++.

(removed in C++20)
Empty header. The macros that appear in iso646.h in C are keywords in C++[edit]
Has no effect[edit]
(C++11)(deprecated in C++17)(removed in C++20)
Defines one compatibility macro constant[edit]
Defines one compatibility macro constant[edit]
(C++11)(deprecated in C++17)(removed in C++20)
Defines one compatibility macro constant[edit]
Defines one compatibility macro constant[edit]

Unsupported C headers

The C headers <stdatomic.h>, <stdnoreturn.h>, and <threads.h> are not included in C++ and have no cxxx equivalents.

Experimental libraries

C++ TR's/TS's also define several collections of headers.

See also

C documentation for C Standard Library headers