C++ 标准库头文件

按类别划分的 C++ 标准库和扩展的头文件。

按类别划分的标头

类别 标头
算法 <algorithm>, <cstdlib>, <numeric>
原子操作 <atomic>11
C 库包装器 <cassert><ccomplex>11 a b<cctype><cerrno><cfenv>11<cfloat><cinttypes>11<ciso646>b<climits><clocale><cmath><csetjmp><csignal><cstdalign>11 a b<cstdarg><cstdbool>11 a b<cstddef><cstdint>11<cstdio><cstdlib><cstring><ctgmath>11 a b<ctime><cuchar>11<cwchar><cwctype>
概念 <concepts>20
容器
序列容器 <array>11<deque><forward_list>11<list><vector>
有序的关联容器 <map><set>
无序的关联容器 <unordered_map>11<unordered_set>11
容器适配器 <queue><stack>
容器视图 <span>20
错误和异常处理 <cassert><exception><stdexcept><system_error>11
常规实用工具 <any>17<bit>20<bitset><cstdlib><execution>17<functional><memory><memory_resource>17<optional>17<ratio>11<scoped_allocator>11<tuple>11<type_traits>11<typeindex>11<utility><variant>17
I/O 和格式设置 <cinttypes>11<cstdio><filesystem>17<fstream><iomanip><ios><iosfwd><iostream><istream><ostream><sstream><streambuf><strstream>c<syncstream>20
迭代器 <iterator>
语言支持 <cfloat><climits><codecvt>11 a<compare>20<contract>20<coroutine>20<csetjmp><csignal><cstdarg><cstddef><cstdint>11<cstdlib><exception><initializer_list>11<limits><new><typeinfo><version>20
本地化 <clocale><codecvt>11 a<cvt/wbuffer><cvt/wstring><locale>
数学和数字 <bit>20<cfenv>11<cmath><complex><cstdlib><limits><numeric><random>11<ratio>11<valarray>
内存管理 <allocators><memory><memory_resource>17<new><scoped_allocator>11
多线程处理 <atomic>11<condition_variable>11<future>11<mutex>11<shared_mutex>14<thread>11
范围 <ranges>20
正则表达式 <regex>11
字符串和字符数据 <charconv>17<cctype><cstdlib><cstring><cuchar>11<cwchar><cwctype><regex>11<string><string_view>17
时间 <chrono>11<ctime>

11 在 C++11 标准中添加。
14 在 C++14 标准中添加。
17 在 C++17 标准中添加。
20 在草案 C++20 标准中添加。
a 在 C++17 标准中已弃用。
b 在草案 C++20 标准中已删除。
c 在 C++98 标准中已弃用。

类别 标头
算法 <algorithm>
C 库包装器 <cassert>, <cctype>, <cerrno>, <cfenv>, <cfloat>, <cinttypes>, <ciso646>, <climits>, <clocale>, <cmath>, <csetjmp>, <csignal>, <cstdarg>, <cstdbool>, <cstddef>, <cstdint>, <cstdio>, <cstdlib>, <cstring>, <ctgmath>, <ctime>, <cwchar>, <cwctype>
容器
序列容器 <array>, <deque>, <forward_list>, <list>, <vector>
有序的关联容器 <map><set>
无序的关联容器 <unordered_map><unordered_set>
适配器容器 <queue><stack>
错误和异常处理 <exception>, <stdexcept>, <system_error>
I/O 和格式设置 <filesystem>, <fstream>, <iomanip>, <ios>, <iosfwd>, <iostream>, <istream>, <ostream>, <sstream>, <streambuf>, <strstream>
迭代器 <iterator>
本地化 <codecvt>, <cvt/wbuffer>, <cvt/wstring>, <locale>
数学和数字 <complex>, <limits>, <numeric>, <random>, <ratio>, <valarray>
内存管理 <allocators>, <memory>, <new>, <scoped_allocator>
多线程处理 <atomic>, <condition_variable>, <future>, <mutex>, <shared_mutex>, <thread>
其他实用工具 <bitset><chrono><functional><initializer_list><tuple><type_traits><typeinfo><typeindex><utility>
字符串和字符数据 <regex>, <string>, <string_view>

另请参阅

使用 C++ 库标头
C++ 标准库