当前位置:网站首页>C + + standard library header file

C + + standard library header file

2020-11-10 10:44:44 Take off the stars

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

Concept Library

<concepts>

(C++20)

Basic library concept

Process library

<coroutine>

(C++20)

Coprocess support library

Tool library

<cstdlib>

General tools : Program control Dynamic memory allocation random number Sort and search

<csignal>

Signal management functions and macro constants

<csetjmp>

preservation ( And jump ) Macro to execution environment ( And functions )

<cstdarg>

Variable length argument list processing

<typeinfo>

Runtime type information tool

<typeindex>

(C++11)

std::type_index

<type_traits>

(C++11)

Compile time type information

<bitset>

std::bitset Class template

<functional>

Function object 、 Function call 、 Binding operations and reference wrappers

<utility>

Varied Tool set

<ctime>

C Style date / Time tools

<chrono>

(C++11)

C++ Time tools

<cstddef>

Standard macro and typedef

<initializer_list>

(C++11)

std::initializer_list Class template

<tuple>

(C++11)

std::tuple Class template

<any>

(C++17)

std::any class

<optional>

(C++17)

std::optional Class template

<variant>

(C++17)

std::variant Class template

<compare>

(C++20)

Three way comparison operator Support

<version>

(C++20)

Provides library information that depends on the implementation

<source_location>

(C++20)

Provide access to Source location The means of

Dynamic memory management

<new>

Low level memory management tools

<memory>

High level memory management tools

<scoped_allocator>

(C++11)

Nested allocator classes

<memory_resource>

(C++17)

Polymorphic allocators and memory resources

Numerical limits

<climits>

The limit of integer type

<cfloat>

The limits of floating point types

<cstdint>

(C++11)

Fixed width integer type And Other types of limits

<cinttypes>

(C++11)

Format macro intmax_t And uintmax_t Mathematics and transformation

<limits>

A consistent way to query arithmetic type properties

Error handling

<exception>

Exception handling tools

<stdexcept>

Standard exception object

<cassert>

Compare conditional compilation macros that actually participate in zero

<system_error>

(C++11)

Definition std::error_code , Platform dependent error codes

<cerrno>

Macro with last error number

String Library

<cctype>

Function to determine narrow character categories

<cwctype>

A function that determines the category of wide characters

<cstring>

Varied Narrow string processing function

<cwchar>

Varied wide And Multibyte String handling functions

<cuchar>

(C++11)

C style Unicode Character conversion function

<string>

std::basic_string Class template

<string_view>

(C++17)

std::basic_string_view Class template

<charconv>

(C++17)

std::to_chars And std::from_chars

<format>

(C++20)

Format library , Include std::format

Container Library

<array>

(C++11)

std::array Containers

<vector>

std::vector Containers

<deque>

std::deque Containers

<list>

std::list Containers

<forward_list>

(C++11)

std::forward_list Containers

<set>

std::set And std::multiset Associate container

<map>

std::map And std::multimap Associate container

<unordered_set>

(C++11)

std::unordered_set And std::unordered_multiset Unordered Association container

<unordered_map>

(C++11)

std::unordered_map And std::unordered_multimap Unordered Association container

<stack>

std::stack Container adapter

<queue>

std::queue And std::priority_queue Container adapter

<span>

(C++20)

std::span View

Iterator Library

<iterator>

Range iterators

Range Library

<ranges>

(C++20)

Scope access 、 Components 、 requirement 、 Tools and adapters

Algorithm library

<algorithm>

Algorithms that operate on ranges

<execution>

(C++17)

The predefined execution strategy of parallel version algorithm

Numerical library

<cmath>

Common mathematical functions

<complex>

Plural type

<valarray>

Classes that represent and manipulate arrays of values

<random>

(C++11)

Random number generators and distributions

<numeric>

A numerical operation on a value in a range

<ratio>

(C++11)

Compile time rational arithmetic

<cfenv>

(C++11)

Floating point environment Access function

<bit>

(C++20)

Bit manipulation function

<numbers>

(C++20)

Mathematical constants

Localization Library

<locale>

Localization tools

<clocale>

C Localization tools

<codecvt>

(C++11)(C++17 To discard )

Unicode Conversion facilities

Input / Output library

<iosfwd>

Input / Output the pre declaration of all classes in the library

<ios>

std::ios_base class 、 std::basic_ios Class template and several typedef

<istream>

std::basic_istream Class template and several typedef

<ostream>

std::basic_ostreamstd::basic_iostream Class template and several typedef

<iostream>

Several standard stream objects

<fstream>

std::basic_fstreamstd::basic_ifstreamstd::basic_ofstream Class template and several typedef

<sstream>

std::basic_stringstreamstd::basic_istringstreamstd::basic_ostringstream Class template and several typedef

<syncstream>

(C++20)

std::basic_osyncstream 、 std::basic_syncbuf And typedef

<strstream>

(C++98 To discard )

std::strstreamstd::istrstreamstd::ostrstream

<iomanip>

Auxiliary functions for formatting input and output

<streambuf>

std::basic_streambuf Class template

<cstdio>

C Style input and output functions

File system library

<filesystem>

(C++17)

std::path Class and Support functions

Regular expression library

<regex>

(C++11)

Classes that support regular expression processing 、 Algorithms and iterators

Atomic operation Library

<atomic>

(C++11)

Atomic operation Library

Thread support library

<thread>

(C++11)

std::thread Class and Support functions

<stop_token>

(C++20)

std::jthread The stop sign of

<mutex>

(C++11)

Mutex components

<shared_mutex>

(C++14)

Shared mutex

<future>

(C++11)

Asynchronous computing components

<condition_variable>

(C++11)

Thread wait condition

<semaphore>

(C++20)

Semaphore

<latch>

(C++20)

Latch

<barrier>

(C++20)

barrier

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 .

<assert.h>

( Abandoning )

Behave in the same way as <cassert>

<ctype.h>

( Abandoning )

Act as if each comes from <cctype> The name of is placed in the global namespace

<errno.h>

( Abandoning )

Behave in the same way as <cerrno>

<fenv.h>

(C++11)( Abandoning )

Act as if each comes from <cfenv> The name of is placed in the global namespace

<float.h>

( Abandoning )

Behave in the same way as <cfloat>

<inttypes.h>

(C++11)( Abandoning )

Act as if each comes from <cinttypes> The name of is placed in the global namespace

<limits.h>

( Abandoning )

Behave in the same way as <climits>

<locale.h>

( Abandoning )

Act as if each comes from <clocale> The name of is placed in the global namespace

<math.h>

( Abandoning )

Act as if each comes from <cmath> The name of is placed in the global namespace ,
except Special functions of Mathematics Name

<setjmp.h>

( Abandoning )

Act as if each comes from <csetjmp> The name of is placed in the global namespace

<signal.h>

( Abandoning )

Act as if each comes from <csignal> The name of is placed in the global namespace

<stdarg.h>

( Abandoning )

Act as if each comes from <cstdarg> The name of is placed in the global namespace

<stddef.h>

( 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

<stdint.h>

(C++11)( Abandoning )

Act as if each comes from <cstdint> The name of is placed in the global namespace

<stdio.h>

( Abandoning )

Act as if each comes from <cstdio> The name of is placed in the global namespace

<stdlib.h>

( Abandoning )

Act as if each comes from <cstdlib> The name of is placed in the global namespace

<string.h>

( Abandoning )

Act as if each comes from <cstring> The name of is placed in the global namespace

<time.h>

( Abandoning )

Act as if each comes from <ctime> The name of is placed in the global namespace

<uchar.h>

(C++11)( Abandoning )

Act as if each comes from <cuchar> The name of is placed in the global namespace

<wchar.h>

( Abandoning )

Act as if each comes from <cwchar> The name of is placed in the global namespace

<wctype.h>

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

<ccomplex>

(C++11)(C++17 To discard )(C++20 Remove )

Simply include the header file <complex>

<complex.h>

(C++11)( Abandoning )

Simply include the header file <complex>

<ctgmath>

(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

<tgmath.h>

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

<ciso646>

(C++20 Remove )

Short paper . C in iso646.h The macro that appears in yes C++ Key words in

<iso646.h>

( Abandoning )

No effect

<cstdalign>

(C++11)(C++17 To discard )(C++20 Remove )

Define a Compatibility macro constants

<stdalign.h>

(C++11)( Abandoning )

Define a Compatibility macro constants

<cstdbool>

(C++11)(C++17 To discard )(C++20 Remove )

Define a Compatibility macro constants

<stdbool.h>

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

版权声明
本文为[Take off the stars]所创,转载请带上原文链接,感谢