Namespaces
Variants
Actions

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.

(C++17)
Predefined execution policies for parallel versions of the algorithms and execution control components(since C++26)[edit]

Language support library

Supplies means to obtain source code location [edit]
(C++20)
Supplies macros for verifying implementation status of library[edit]

Concepts library

Diagnostics library

(C++26)
Debugging library[edit]
Defines std::error_code , a platform-dependent error code[edit]

Memory management library

Metaprogramming library

General utilities library

(C++17)
std::any class[edit]
(C++20)
Bit manipulation functions[edit]
(C++23)
std::expected class template[edit]
(C++17)
std::optional class template[edit]
(C++11)
std::tuple class template[edit]
(C++17)
std::variant class template[edit]

Containers library

(C++11)
std::array container[edit]
(C++23)
std::flat_map and std::flat_multimap container adaptors[edit]
(C++23)
std::flat_set and std::flat_multiset container adaptors[edit]
(C++26)
std::hive container[edit]
std::inplace_vector container[edit]
std::map and std::multimap associative containers[edit]
(C++23)
std::mdspan view[edit]
std::set and std::multiset associative containers[edit]
(C++20)
std::span view[edit]
std::stack container adaptor[edit]
std::unordered_map and std::unordered_multimap unordered associative containers[edit]
std::unordered_set and std::unordered_multiset unordered associative containers[edit]

Iterators library

Ranges library

(C++23)
std::generator class template[edit]

Algorithms library

Strings library

Text processing library

(C++17)
std::to_chars and std::from_chars[edit]
(C++11)(deprecated in C++17)(removed in C++26)
Unicode conversion facilities [edit]
Various wide and multibyte string handling functions[edit]
Text encoding identifications[edit]

Numerics library

(C++11)
Floating-point environment access functions[edit]

Time library

Input/output library

(C++11)
Formatting macros, intmax_t and uintmax_t math and conversions[edit]
std::ios_base class, std::basic_ios class template and typedefs[edit]
Forward declarations of all classes in the input/output library[edit]
Several standard stream objects[edit]
std::basic_istream class template and typedefs[edit]
(C++23)
Formatted output library including std::print[edit]
std::basic_spanstream, std::basic_ispanstream, std::basic_ospanstream class templates and typedefs[edit]
(deprecated in C++98)(removed in C++26)
std::strstream , std::istrstream , std::ostrstream [edit]
std::basic_osyncstream, std::basic_syncbuf and typedefs[edit]

Concurrency support library

Hazard pointers[edit]
(C++26)
Read-copy update mechanisms[edit]
Stop tokens for std::jthread [edit]

[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). The intended use of headers of form xxx.h is for interoperability only. It is possible that C++ source files need to include one of these headers in order to be valid ISO C. Source files that are not intended to also be valid ISO C should not use any of the C headers.

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.

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> [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]
(C++11)
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]

[edit] Special C compatibility headers

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

Defines _Atomic and provides corresponding components in the C standard library[edit]
(C++26)
Provides corresponding components in the C standard library[edit]
Provides corresponding components in the C standard library[edit]

[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.

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

[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++.

(C++11)(deprecated in C++17)(removed in C++20)
Defines a compatibility macro constant __bool_true_false_are_defined [edit]
Has no effect[edit]

[edit] 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 equivalents.

[edit] Experimental libraries

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

[edit] See also

C documentation for Standard Library headers
Retrieved from "https://en.cppreference.com/mwiki/index.php?title=cpp/header&oldid=182846"

AltStyle によって変換されたページ (->オリジナル) /