C++ Standard Library headers

From cppreference.com
< cpp
Standard library headers

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

Multi-purpose headers

General purpose utilities: program control, dynamic memory allocation, random numbers, sort and search
(C++17)
Predefined execution policies for parallel versions of the algorithmsand execution control components(since C++26)

Language support library

Limits of floating-point types
Limits of integral types
(C++20)
Three-way comparison operator support
(C++20)
Coroutine support library
Macro (and function) that saves (and jumps) to an execution context
Functions and macro constants for signal management
Handling of variable length argument lists
Standard macros and typedefs
(C++11)
Fixed-width integer types and limits of other types
Exception handling utilities
std::initializer_list class template
Query properties of arithmetic types
Low-level memory management utilities
Supplies means to obtain source code location
(C++23)
Fixed-width floating-point types
(C++11)
std::type_index
Runtime type information utilities
(C++20)
Supplies macros for verifying implementation status of library

Concepts library

(C++20)
Fundamental library concepts

Diagnostics library

Conditionally compiled macro that compares its argument to zero
Macro containing the last error number
(C++26)
Debugging library
(C++23)
Stacktrace library
Standard exception types
(C++11)
Defines std::error_code, a platform-dependent error code

Memory management library

High-level memory management utilities
Polymorphic allocators and memory resources
Nested allocator class

Metaprogramming library

(C++11)
Compile-time rational arithmetic
(C++11)
Compile-time type information utilities

General utilities library

(C++17)
std::any class
(C++20)
Bit manipulation functions
std::bitset class template
(C++23)
std::expected class template
Function objects, Function invocations, Bind operations and Reference wrappers
(C++17)
std::optional class template
(C++11)
std::tuple class template
Various utility components
(C++17)
std::variant class template

Containers library

(C++11)
std::array container
std::deque container
(C++23)
std::flat_map and std::flat_multimap container adaptors
(C++23)
std::flat_set and std::flat_multiset container adaptors
(C++11)
std::forward_list container
std::inplace_vector container
std::list container
std::map and std::multimap associative containers
(C++23)
std::mdspan view
std::queue and std::priority_queue
std::set and std::multiset associative containers
(C++20)
std::span view
std::stack container adaptor
(C++11)
std::unordered_map and std::unordered_multimap
(C++11)
std::unordered_set and std::unordered_multiset
std::vector container

Iterators library

Range iterators

Ranges library

(C++23)
std::generator class template
(C++20)
Range access, primitives, requirements, utilities and adaptors

Algorithms library

Algorithms that operate on ranges
Numeric operations on values in ranges

Strings library

Various narrow character string handling functions
std::basic_string class template
(C++17)
std::basic_string_view class template

Text processing library

Functions to determine the category of narrow characters
(C++17)
std::to_chars and std::from_chars
C localization utilities
(C++11) (deprecated in C++17) (removed in C++26)
Unicode conversion facilities
(C++11)
C-style Unicode character conversion functions
Various wide and multibyte string handling functions
Functions to determine the category of wide characters
(C++20)
Formatting library including std::format
Localization utilities
(C++11)
Classes, algorithms and iterators to support regular expression processing
(C++26)
Text encoding identifications

Numerics library

(C++11)
Floating-point environment access functions
Common mathematics functions
Complex number type
(C++26)
Basic linear algebra algorithms (BLAS)
(C++20)
Math constants
(C++11)
Random number generators and distributions
(C++26)
Data-parallel types and operations on these types
Class for representing and manipulating arrays of values

Time library

(C++11)
C++ time utilities
C-style time/date utilities

Input/output library

(C++11)
Formatting macros, intmax_t and uintmax_t math and conversions
C-style input-output functions
(C++17)
std::filesystem::path class and supporting functions
std::basic_fstream, std::basic_ifstream, std::basic_ofstream
Helper functions to control the format of input and output
std::ios_base class, std::basic_ios class template and typedefs
Forward declarations of all classes in the input/output library
Several standard stream objects
std::basic_istream class template and typedefs
std::basic_ostream, std::basic_iostream
(C++23)
Formatted output library including std::print
(C++23)
std::basic_spanstream, std::basic_ispanstream, std::basic_ospanstream class templates and typedefs
std::basic_stringstream, std::basic_istringstream, std::basic_ostringstream
std::basic_streambuf class template
(deprecated in C++98)(removed in C++26)
std::strstream, std::istrstream, std::ostrstream
(C++20)
std::basic_osyncstream, std::basic_syncbuf and typedefs

Concurrency support library

(C++11)
Atomic operations library
(C++20)
Barriers
Thread waiting conditions
(C++11)
Primitives for asynchronous computations
Hazard pointers
(C++20)
Latches
(C++11)
Mutual exclusion primitives
(C++26)
Read-copy update mechanisms
(C++20)
Semaphores
(C++14)
Shared mutual exclusion primitives
(C++20)
Stop tokens for std::jthread
(C++11)
std::thread class and supporting functions

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). The intended use of headers of form xxx

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

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

Notes: xxx.h headers are deprecated in C++98 and undeprecated in C++23. These headers are discouraged for pure C++ code, but not subject to future removal.

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

Special C compatibility headers

The header <stdatomic.h> declares names which are also provided in the C standard library, and defines the _Atomic macro which is a keyword in C. Unlike other xxx.h headers, corresponding <cstdatomic>

(C++23)
Defines _Atomic and provides corresponding components in the C standard library

Empty C headers

The headers <complex.h>, <ccomplex>, <tgmath.h>, and <ctgmath>

(C++11) (deprecated in C++17) (removed in C++20)
Simply includes the header <complex>
(C++11)
Simply includes the header <complex>
(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
(C++11)
Simply includes the headers <complex> and <cmath>

Meaningless C headers

The headers <ciso646>, <cstdalign>, and <cstdbool>

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

Unsupported C headers

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

Experimental libraries

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

See also

C documentation for C Standard Library headers