C++标准库头文件

概念库

<concepts> (C++20 起)基础库概念

协程库

<coroutine> (C++20 起)协程支持库

工具库

<cstdlib>通用工具:程序控制动态内存分配随机数排序与搜索
<csignal>信号管理的函数与宏常量
<csetjmp>保存执行语境的宏,及跳转到某个执行语境的函数
<cstdarg>变长实参列表的处理
<typeinfo>运行时类型信息工具
<typeindex> (C++11 起)std::type_index
<type_traits> (C++11 起)编译时类型信息
<bitset>std::bitset 类模板
<functional>函数对象、函数调用、绑定操作、引用包装
<utility>多种工具组件
<ctime>C 风格的时间/日期工具
<chrono> (C++11 起)C++ 时间工具
<cstddef>标准宏和 typedef
<initializer_list> (C++11 起)std::initializer_list 类模板
<tuple> (C++11 起)std::tuple 类模板
<any> (C++17 起)std::any 类
<optional> (C++17 起)std::optional 类模板
<variant> (C++17 起)std::variant 类模板
<compare> (C++20 起)三路比较运算符支持
<version> (C++20 起)提供依赖于实现的库信息
<source_location> (C++20 起)提供获得源码位置的手段

动态内存管理

<new>低层内存管理工具
<memory>高层内存管理工具
<scoped_allocator> (C++11 起)嵌套分配器类
<memory_resource> (C++17 起)多态分配器及内存资源

数值界限

<climits>整型类型的界限
<cfloat>浮点类型的界限
<cstdint> (C++11 起)定长整数其他类型的界限
<cinttypes> (C++11 起)格式化宏、 intmax_t 及 uintmax_t,数学工具及转换
<limits>查询算术类型属性的标准化方式

错误处理

<exception>异常处理工具
<stdexcept>标准异常对象
<cassert>将其实参与零比较的条件性编译宏
<system_error> (C++11 起)定义 std::error_code,依赖于平台的错误码
<cerrno>含有最近一次错误号的宏

字符串库

<cctype>确定字符数据中所含类型的函数
<cwctype>确定宽字符数据中所含类型的函数
<cstring>多种窄字符串处理函数
<cwchar>多种多字节字符串处理函数
<cuchar> (C++11 起)C 风格 Unicode 字符转换函数
<string>std::basic_string 类模板
<string_view> (C++17 起)std::basic_string_view 类模板
<charconv> (C++17 起)std::to_chars 与 std::from_chars
<format> (C++20 起)格式化库,包括 std::format

容器库

<array> (C++11 起)std::array 容器
<vector>std::vector 容器
<deque>std::deque 容器
<list>std::list 容器
<forward_list> (C++11 起)std::forward_list 容器
<set>std::set 及 std::multiset 关联容器
<map>std::map 及 std::multimap 关联容器
<unordered_set> (C++11 起)std::unordered_set 及 std::unordered_multiset 无序关联容器
<unordered_map> (C++11 起)std::unordered_map 及 std::unordered_multimap 无序关联容器
<stack>std::stack 容器适配器
<queue>std::queue 及 std::priority_queue 容器适配器
<span> (C++20 起)std::span 视图

迭代器库

<iterator>范围迭代器

范围库

<ranges> (C++20 起)范围访问、原语、要求、工具及适配器

算法库

<algorithm>对范围操作的算法
<execution> (C++17 起)针对算法的并行版本的预定义执行策略

数值库

<cmath>常用数学函数
<complex>复数类型
<valarray>表示和操作值的数组的类
<random> (C++11 起)随机数生成器及分布
<numeric>容器中值的数值运算
<ratio> (C++11 起)编译时有理数算术
<cfenv> (C++11 起)浮点环境访问函数
<bit> (C++20 起)位操纵函数
<numbers> (C++20 起)数学常数

输入/输出库

<iosfwd>所有输入/输出库中的类的前置声明
<ios>std::ios_base 类、std::basic_ios 类模板及数个 typedef
<istream>std::basic_istream 类模板及数个 typedef
<ostream>std::basic_ostreamstd::basic_iostream 类模板及数个 typedef
<iostream>数个标准流对象
<fstream>std::basic_fstreamstd::basic_ifstreamstd::basic_ofstream 类模板及数个typedef
<sstream>std::basic_stringstreamstd::basic_istringstreamstd::basic_ostringstream类模板及数个 typedef
<syncstream> (C++20 起)std::basic_osyncstream、std::basic_syncbuf 及 typedef
<strstream> (C++98 中弃用)std::strstreamstd::istrstreamstd::ostrstream
<iomanip>控制输入输出格式的辅助函数
<streambuf>std::basic_streambuf 类模板
<cstdio>C 风格输入输出函数

本地化库

<locale>本地化工具
<clocale>C 本地化工具
<codecvt> (C++11 起)(C++17 中弃用)Unicode 转换设施

正则表达式库

<regex> (C++11 起)支持正则表达式处理的类、算法及迭代器

原子操作库

<atomic> (C++11 起)原子操作库

线程支持库

<thread> (C++11 起)std::thread 类及支持函数
<stop_token> (C++20 起)std::jthread 的停止记号
<mutex> (C++11 起)互斥原语
<shared_mutex> (C++14 起)共享的互斥原语
<future> (C++11 起)异步计算的原语
<condition_variable> (C++11 起)线程等待条件
<semaphore> (C++20 起)信号量
<latch> (C++20 起)
<barrier> (C++20 起)屏障

文件系统库

<filesystem> (C++17 起)std::path 类及 支持函数

 

C 兼容头文件

对于一些拥有 xxx.h 形式的 C 标准库头文件

C++ 标准库同时包含同名的头文件和拥有形式cxxx的头文件(所有有意义的 cxxx 头文件列于上方)

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值