The C++ standard library
The C++ Standard Library includes a set of header files that provide various functions and tools, covering input/output, containers, algorithms, multithreading, regular expressions, and more.
The C++ Standard Library can be divided into two parts:
- Standard Function Library: This library consists of general-purpose, independent functions that do not belong to any class. The function library is inherited from the C language.
- Object-Oriented Class Library: This library is a collection of classes and their related functions.
The C++ Standard Library contains all of the C standard library, with certain additions and modifications to support type safety.
The following is the classification of the main components of the C++ Standard Library and the corresponding list of header files:
Input/Output
: Standard input/output streams: File input/output streams: String streams: Input/output stream formatting
Containers
: Fixed-size array container: Dynamic array container: Double-ended queue container: Doubly linked list container: Singly linked list container: Stack container adapter: Queue container adapter: Priority queue container adapter: Set container (based on balanced binary tree): Unordered set container (based on hash table): Map container (key-value pairs, based on balanced binary tree): Unordered map container (based on hash table): Bitset container
Algorithms and Iterators
Function Objects and Binders
Math and Numeric Operations
: Numeric operations (such as accumulate, product, etc.): Complex number operations: Array class and related operations: Math functions
Strings and Regular Expressions
Time and Date
Multithreading and Concurrency
: Multithreading support: Mutexes: Condition variables: Asynchronous programming support: Atomic operations
Memory management
Type Traits and Runtime Type Identification
Exception handling
: Exception handling base classes and related utilities: Common exception classes (such asstd::runtime_erroretc.)
Input/Output Operations
Other Utilities
: General utilities (such asstd::pairandstd::moveetc.)- ``
: Random number generation : Localization support: Character encoding conversion: Assertions: Character handling: String handling: Wide character handling: Numeric limits: Floating-point limits: General utilities (such asstd::randandstd::absetc.)
These header files form the foundation of the C++ Standard Library, providing rich functionality that supports developers in various types of programming tasks.