C++ The interface of the standard library is defined by the collection of the following header files .
Concept Library
(C++20)
Process library
(C++20)
Tool library
General tools : Program control 、 Dynamic memory allocation 、 random number 、 Sort and search
Signal management functions and macro constants
preservation ( And jump ) Macro to execution environment ( And functions )
Variable length argument list processing
(C++11)
(C++11)
std::bitset Class template
Function object 、 Function call 、 Binding operations and reference wrappers
Varied Tool set
(C++11)
(C++11)
std::initializer_list Class template
(C++11)
std::tuple Class template
(C++17)
std::any class
(C++17)
std::optional Class template
(C++17)
std::variant Class template
(C++20)
Three way comparison operator Support
(C++20)
Provides library information that depends on the implementation
(C++20)
Provide access to Source location The means of
Dynamic memory management
Low level memory management tools
High level memory management tools
(C++11)
(C++17)
Polymorphic allocators and memory resources
Numerical limits
The limits of floating point types
(C++11)
Fixed width integer type And Other types of limits
(C++11)
Format macro 、 intmax_t
And uintmax_t
Mathematics and transformation
A consistent way to query arithmetic type properties
Error handling
Compare conditional compilation macros that actually participate in zero
(C++11)
Definition std::error_code , Platform dependent error codes
String Library
Function to determine narrow character categories
A function that determines the category of wide characters
Varied Narrow string processing function
Varied wide And Multibyte String handling functions
(C++11)
C style Unicode Character conversion function
std::basic_string Class template
(C++17)
std::basic_string_view Class template
(C++17)
std::to_chars And std::from_chars
(C++20)
Format library , Include std::format
Container Library
(C++11)
std::array Containers
std::vector Containers
std::deque Containers
std::list Containers
(C++11)
std::forward_list Containers
std::set And std::multiset Associate container
std::map And std::multimap Associate container
(C++11)
std::unordered_set And std::unordered_multiset Unordered Association container
(C++11)
std::unordered_map And std::unordered_multimap Unordered Association container
std::stack Container adapter
std::queue And std::priority_queue Container adapter
(C++20)
std::span View
Iterator Library
Range Library
(C++20)
Scope access 、 Components 、 requirement 、 Tools and adapters
Algorithm library
Algorithms that operate on ranges
(C++17)
The predefined execution strategy of parallel version algorithm
Numerical library
Classes that represent and manipulate arrays of values
(C++11)
Random number generators and distributions
A numerical operation on a value in a range
(C++11)
Compile time rational arithmetic
(C++11)
Floating point environment Access function
(C++20)
Bit manipulation function
(C++20)
Localization Library
(C++11)(C++17 To discard )
Input / Output library
Input / Output the pre declaration of all classes in the library
std::ios_base class 、 std::basic_ios Class template and several typedef
std::basic_istream Class template and several typedef
std::basic_ostream 、 std::basic_iostream Class template and several typedef
Several standard stream objects
std::basic_fstream 、 std::basic_ifstream 、 std::basic_ofstream Class template and several typedef
std::basic_stringstream 、 std::basic_istringstream 、 std::basic_ostringstream Class template and several typedef
(C++20)
std::basic_osyncstream 、 std::basic_syncbuf And typedef
(C++98 To discard )
std::strstream 、 std::istrstream 、 std::ostrstream
Auxiliary functions for formatting input and output
std::basic_streambuf Class template
C Style input and output functions
File system library
(C++17)
std::path Class and Support functions
Regular expression library
(C++11)
Classes that support regular expression processing 、 Algorithms and iterators
Atomic operation Library
(C++11)
Thread support library
(C++11)
std::thread Class and Support functions
(C++20)
std::jthread The stop sign of
(C++11)
(C++14)
(C++11)
Asynchronous computing components
(C++11)
(C++20)
(C++20)
(C++20)
C Compatible with header files
For some forms it is xxx.h Of C Standard library header file ,C++ The standard library contains both the header file with the same name and the ownership form cxxx The header file ( All the meaningful cxxx The header file is listed above ).
except complex.h This exception ,C++ Each of the xxx.h The header file will be corresponding to cxxx Chinese should have been placed in std Each name in the namespace is placed in the global namespace .
Allow these header files to be in std The same name is declared in the namespace , And allow the corresponding cxxx The header file also declares the same name in the global namespace : contain <cstdlib>
It will definitely provide std::malloc, Also available ::malloc. contain <stdlib.h>
It will definitely provide ::malloc, Also available std::malloc. This even applies to things that are not C Functions and function overloads that are part of the standard library .
( Abandoning )
Behave in the same way as <cassert>
( Abandoning )
Act as if each comes from <cctype> The name of is placed in the global namespace
( Abandoning )
Behave in the same way as <cerrno>
(C++11)( Abandoning )
Act as if each comes from <cfenv> The name of is placed in the global namespace
( Abandoning )
Behave in the same way as <cfloat>
(C++11)( Abandoning )
Act as if each comes from <cinttypes> The name of is placed in the global namespace
( Abandoning )
Behave in the same way as <climits>
( Abandoning )
Act as if each comes from <clocale> The name of is placed in the global namespace
( Abandoning )
Act as if each comes from <cmath> The name of is placed in the global namespace ,
except Special functions of Mathematics Name
( Abandoning )
Act as if each comes from <csetjmp> The name of is placed in the global namespace
( Abandoning )
Act as if each comes from <csignal> The name of is placed in the global namespace
( Abandoning )
Act as if each comes from <cstdarg> The name of is placed in the global namespace
( Abandoning )
Act as if each comes from <cstddef> The name of is placed in the global namespace ,
except std::byte
And the correlation function Name
(C++11)( Abandoning )
Act as if each comes from <cstdint> The name of is placed in the global namespace
( Abandoning )
Act as if each comes from <cstdio> The name of is placed in the global namespace
( Abandoning )
Act as if each comes from <cstdlib> The name of is placed in the global namespace
( Abandoning )
Act as if each comes from <cstring> The name of is placed in the global namespace
( Abandoning )
Act as if each comes from <ctime> The name of is placed in the global namespace
(C++11)( Abandoning )
Act as if each comes from <cuchar> The name of is placed in the global namespace
( Abandoning )
Act as if each comes from <cwchar> The name of is placed in the global namespace
( Abandoning )
Act as if each comes from <cwctype> The name of is placed in the global namespace
empty C The header file
The header file <complex.h>
、<ccomplex>
、<tgmath.h>
And <ctgmath>
It doesn't contain anything from C Content of the standard library , And it's just about including others from C++ Standard library header file .C++ The use of these header files in has been abandoned .
(C++11)(C++17 To discard )(C++20 Remove )
Simply include the header file <complex>
(C++11)( Abandoning )
Simply include the header file <complex>
(C++11)(C++17 To discard )(C++20 Remove )
Simply include the header file <complex> And <cmath> : Equivalent to C The header file tgmath.h
Overload of has been provided in the previous header file
(C++11)( Abandoning )
Simply include the header file <complex> And <cmath>
Meaningless C The header file
The header file <ciso646>
、<cstdalign>
And <cstdbool>
stay C++ There is no meaning in , Because they are C The macro provided in is C++ Key words .
(C++20 Remove )
Short paper . C in iso646.h
The macro that appears in yes C++ Key words in
( Abandoning )
No effect
(C++11)(C++17 To discard )(C++20 Remove )
Define a Compatibility macro constants
(C++11)( Abandoning )
Define a Compatibility macro constants
(C++11)(C++17 To discard )(C++20 Remove )
Define a Compatibility macro constants
(C++11)( Abandoning )
Define a Compatibility macro constants
Unsupported C The header file
C++ It doesn't contain C The header file <stdatomic.h>
、<stdnoreturn.h>
And <threads.h>
And they don't have cxxx Equivalent version .
Experimental Library
C++ TR/TS It also defines the collection of several header files .