自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

Jeff_的博客

学习的小白,吃饭的王者。

  • 博客(268)
  • 资源 (4)
  • 问答 (1)
  • 收藏
  • 关注

原创 Matter (CHIP) 从入门到入土 (一)

Matter(Project Connected Home over IP,简称为CHIP项目)是一个智能家居开源标准项目,由亚马逊、苹果、谷歌、ZigBee联盟联合发起,旨在开发、推广一项免除专利费的新连接协议,以简化智能家居设备商开发成本,提高产品之间兼容性。2021年5月11日,CHIP更名为Matter,ZigBee联盟也更名为连接标准联盟(Connectivity Standards Alliance)。CHIP 让不同的智能家居设备间,使用 IP 地址作为身份证,互相通讯。最终目的是让那些功

2022-02-08 15:42:25 17353

原创 Bluetooth 蓝牙介绍(七):逻辑链路控制和适配协议规范(L2cap 协议)

文章目录前言L2CAP 特性前提术语常规操作通道标识符操作模式数据包格式蓝牙逻辑链路控制和适配协议 (L2CAP) 支持更高级别的协议复用、数据包分段和重组以及服务质量信息的传送。规范的本部分描述了协议状态机、数据包格式和组成 。前言蓝牙规范的这一部分定义了逻辑链路控制和适配层协议,简称 L2CAP。L2CAP 为具有协议复用能力和分段和重组操作的上层协议提供面向连接和无连接的数据服务。L2CAP 允许更高级别的协议和应用程序传输和接收长达 64 KB 的上层数据包(L2CAP 服务数据

2021-11-30 20:18:20 4147

原创 计算机网络笔记(五):传输层

文章目录前言多路复用和多路分用前言理解传输层服务的基本理论和基本机制多路复用/分用可靠数据传输机制流量控制机制拥塞控制机制传输层协议为运行在不同Host上的进程提供了一种逻辑通信机制。端系统运行传输层协议发送方:将应用递交的消息分成一个或多个的Segment,并向下传给网络层。接受方:将接收到的Segment组装成消息,并向上交给应用层。传输层与网络层网络层:提供主机之间的逻辑通信机制传输层:提供应用进程之间的逻辑通信机制可靠的、按序的交付服务(TCP)拥塞控制

2021-11-24 20:42:46 880

原创 计算机网络笔记(四):Socket编程

前言几种典型的应用编程接口Berkeley UNIX操作系统定义了一种API,称为套接字接口(socket interface),简称套接字Socket微软公司在其操作系统中采用了套接字API,形成了一个稍有不同的API,并称之为Windows Socket Interface,WinSockAT&T为其UNIX系统V定义了一种API,简写为TLI(Transport Layer Interface)Socket API最初设计:面向BSD Unix-Berkeley,面向TC

2021-11-13 17:42:07 583

原创 Bluetooth 蓝牙介绍(四):低功耗蓝牙BLE Mesh网络Ⅲ —— 广播 PDU

文章目录前言Mesh MessageAdvertising bearerNetwork PDUMesh beaconsUnprovisioned Device beaconSecure Network beaconPB - ADVProvisioningProvisioning bearer layerPB-ADV PDU前言蓝牙Mesh网络一共有3种广播包,如下图所示,我们接下来按照PDF章节顺序依次介绍。当多个八位字节值被定义为以“大端”(也称为“网络字节顺序”)发送时,数据增长方向与内存增长

2021-11-04 17:39:20 1978

原创 Bluetooth 蓝牙介绍(四):低功耗蓝牙BLE Mesh网络Ⅱ —— Mesh网络

文章目录Mesh networkingFeaturesBearersAdvertising bearerGATT bearerNetwork layerAddressesMesh networking对于接入层和基础模型,所有多八位字节数值应为小端,如第 3.1.1.2 节所述。大端模式:例如,字段 0 为 4 位宽,值为 0x6,字段 1 为 12 位宽,值为 0x987,字段 2 为 16 位宽,值为 0x1234。二进制数的值为 0x69871234,应按 0x69、0x87、0x12、0

2021-11-04 14:40:43 973

原创 计算机网络笔记(三):应用层

网络应用的体系结构客户机/服务器结构(Client-Server,C/S):例子 - Web点对点结构(Peer-to-peer,P2P):例子 - BT优点:高度可伸缩缺点:难于管理混合结构(Hybrid):例子 - Napster-文件传输使用P2P结构文件的搜索使用C/S结构——集中式:1. 每个节点向中央服务器登记自己的内容。2. 每个节点向中央服务器提交查询请求,查找感兴趣的内容。...

2021-10-21 20:53:34 305

原创 计算机网络笔记(二)

计算机网络体系结构OSI参考模型数据封装:增加控制信息,构造协议数据单元(PDU)。控制信息主要包括:地址(Address):标识发送端 / 接收端。差错检测编码(Error-detecting code):用于差错检测或纠正。协议控制(Protocol control):实现协议功能的附加信息,如优先级、服务质量(Qos)、安全控制等。物理层:解决单一bit传输问题接口特性:机械特性、电气特性、功能特性、规程特性比特编码、数据率、比特同步(时钟同步)传输模式:单工(Simple

2021-10-19 20:58:57 235

原创 计算机网络笔记(一)

什么是计算机网络什么是计算机网络? 计算机网络就是互连(互联互通)的、自治(无主从关系)的计算机集合。那么,距离远、数据大如何保证互连?通过交换网络互连主机。什么 是 Internet ?组成:计算机设备、通信链路、分组交换(数据包转发分组)。服务:提供通信服务的通信基础设施、提供应用编程接口(API)。问题:仅有硬件(主机、链路、路由器…)连接,Internet能否顺畅运行?能保证应用数据有序交付吗? NO!还需要网络协议。计算机网络中的数据交换必须遵守实现约定好的规则。什么是网

2021-10-11 20:28:29 228

原创 Bluetooth 蓝牙介绍(六):低功耗蓝牙信息交互

前言蓝牙协议栈跟蓝牙芯片都是使用统一的数据来交互的,由SIG规定(备注:部分芯片有HCI vendor命令),一般交互的有以下几种类型(注意:如果没有特别声明,所有的数据)Command:host to controller 下发命令Event:controller to host 上报事件ACL:基于L2CAP连接的交互数据。无连接的异步连接 (主要用于分组数据传输)SCO: 面向连接的同步连接 (主要用于话音传输)ISO:BLE Audio数据(Core 5.2 Vol 4 Part

2021-10-09 15:13:27 3802 2

翻译 Bluetooth 蓝牙介绍(七):低功耗蓝牙HCI规范

HOST CONTROLLER INTERFACE(HCI) 功能规范如果Controller支持 <Table 3.2: Legacy and extended advertising commands and events> 表中列出的任何传统广播命令或事件,并且还支持 LE 功能(扩展广播),则它应支持表中同一行中相应的扩展广播命令或事件。如果自上次上电或复位以来,Host 曾经发出过传统广播命令然后发出扩展广播命令,或者曾经发出过扩展广播命令然后发出传统广播命令,则控制器应返回错误

2021-09-28 11:40:19 1429

原创 Bluetooth 蓝牙介绍(五):低功耗蓝牙BLE Security

任何系统最常见的一些安全问题包括:Authentication / 身份验证:身份验证证明对方就是他们声称的身份。因此,如果您要连接到 BLE 设备,您需要确保实际连接的是感兴趣的设备——而不是其他一些伪装成该设备的恶意设备。Integerity / 完整性:完整性确保我们收到的数据不会被未经授权的设备损坏和篡改。Confidentiality / 机密性:机密性涉及确保数据不会被未经授权的用户或设备读取。Privacy / 隐私:隐私与通信的私密性有关,以及第三方是否能够跟踪我们的

2021-09-16 11:27:37 7233 3

原创 Bluetooth 蓝牙介绍(四):低功耗蓝牙BLE Mesh网络 Ⅰ—— 基础概念

文章目录背景术语Managed FloodingModelsScenes架构Node Features中继节点代理节点友元节点和低功耗节点示例The Provisioning ProcessStep 1: BeaconingStep 2: InvitationStep 3: Public Key ExchangeStep 4: AuthenticationStep 5: Provision Data DistributionSecurity in Bluetooth mesh节点移除隐私重放攻击参考文献背

2021-09-13 20:59:07 5490

原创 关于typedef的用法总结

typedef的应用typedef是C 语言中用于为现有数据类型指定替代名称的关键字。它主要用于用户定义的数据类型,当数据类型的名称在程序中使用变得稍微复杂时。以下是使用的一般语法typedef <existing_name> <alias_name>应用一:结构体别名typedef也可用于为用户定义的数据类型命名。让我们看看它对结构体的使用。// ======== oldstruct type_name{ type member1; type me

2021-08-22 17:30:01 970

原创 Bluetooth 蓝牙介绍(三):低功耗蓝牙BLE空口协议Ⅱ

文章目录前言4.5 CONNECTION STATE4.5.1 Connection events4.5.2 Supervision timeout4.5.3 Connection event transmit window4.5.4 Connection setup – Master Role4.5.5 Connection setup – Slave Role4.5.6 Closing connection events参考文章前言上篇文章介绍了非连接态下空口的各种状态的表现,现在让我们一起看下在连

2021-07-27 01:11:01 1833

原创 低功耗蓝牙如何实现低功耗

经典蓝牙面临的挑战是电池消耗快和连接频繁丢失,需要频繁配对和重新配对。能够成功解决这些问题是 BLE 快速增长的原因之一。低功耗蓝牙是蓝牙无线技术的智能、省电版本。它已经在将智能小工具转变为更智能的小工具方面发挥着重要作用,使它们变得紧凑、负担得起且不那么复杂。那么BLE是如何实现低功耗的呢,它又有什么技术特点呢?根据SIG官方发布会的资料,它和经典BT的技术相比,主要的改变集中体现在待机功耗的减少、高速连接的实现和峰值功耗的降低3个方面。数据传输: BLE 支持以 1 Mbps 传输的非常短的数据

2021-07-25 21:21:25 2428

原创 Bluetooth 蓝牙介绍(三):低功耗蓝牙BLE空口协议Ⅰ

空口协议包括 multiple access scheme, devicediscovery 和 Link Layer connection methods 三大部分。帧空间同一信道索引上的两个连续数据包之间的时间间隔(time interval)被称为帧间空间。它被定义为从前一个数据包的最后一位结束到后续数据包的第一位开始的时间。 帧间空间指定为“T_IFS”并且应为 150 μs。包含 AuxPtr 的数据包与其指示的辅助数据包(auxiliary packet)之间的最小时间间隔称为最小 AU

2021-07-07 23:38:56 5653 1

原创 Bluetooth 蓝牙介绍(二):低功耗蓝牙BLE协议栈

蓝牙低功耗(Bluetooth Low Energy,或称Bluetooth LE、BLE,旧商标Bluetooth Smart)也称蓝牙低能耗、低功耗蓝牙,是蓝牙技术联盟设计和销售的一种个人局域网技术,旨在用于医疗保健、运动健身、信标、安防、家庭娱乐等领域的新兴应用。其适配经典蓝牙功能,但相较经典蓝牙,低功耗蓝牙旨在保持同等通信范围的同时显著降低功耗和成本。Physical LAYER“蓝牙低功耗”技术采用与“经典蓝牙”技术相同的工作频率(2.400 GHz-2.4835 GHz - ISM频带),

2021-06-20 21:40:08 5963 1

原创 Bluetooth 蓝牙介绍(一) :基础知识

蓝牙背景从1994年由电信商爱立信提出“希望创建一个RS-232数据线的无线通信替代版本,它能够链接多个设备,克服同步的问题”以来,蓝牙经过了20余个岁月的发展,蓝牙技术也经历了五次重要的迭代,目前由SIG(蓝牙技术联盟)来负责维护其技术标准。第一代:产品处于开发初期,各个厂商版本因为实现不同出现不兼容,地址无法匿名化,通信间无法自适应跳频,速度慢,无错误自恢复等问题也亟须改良。第二代:蓝牙2.0+EDR版加入了“非跳跃窄频通道”(Non-hopping narrowband channel)。因为

2021-06-05 16:02:23 16279 2

原创 笔记总结备份

目录文章目录目录前言版本控制操作系统系统架构图Linux线程 / 进程用户态内核态线程shell 脚本编程语言编译与调试通信算法专业名词前言文章源于工作内网原因只能记录在笔记本,最近打算换个工作环境,整理下资料,简单分个类,也顺便回顾下之前的内容,也相当于做个备份。回头看看,有些问题现在看有点简单了,但是有些问题好久没有处理也快忘了。有些地方因为是流程图,就不再用绘图软件在画了,直接拍张图片凑合看看吧。因为基本都是之前不懂的问题,肯定文章有些错误,如有人发现也希望能够指正。版本控制持续集成服务

2021-04-11 22:53:32 1643

原创 设计模式:创建型模式之工厂模式(c++)

前言工厂方法模式(英语:Factory method pattern) 又称为 虚拟构造函数、Virtual Constructor、Factory Method,是一种创建型设计模式, 其在父类中提供一个创建对象的方法, 允许子类决定实例化对象的类型,工厂方法让类的实例化推迟到子类中进行。简单工厂模式简单工厂模式我们将其分为以下几类:工厂类角色:这是本模式的核心,含有一定的商业逻辑和判断逻辑。抽象产品角色:它一般是具体产品继承的父类或者实现的接口。具体产品角色:工厂类所创建的对象就是此角色的

2021-04-07 23:59:33 198

原创 我们是否需要 do...while(0)

1. 前言在许多C / C ++宏中,可以看到许多看起来毫无意义的do while循环中的宏代码。Like:#define FOO(X) do { f(X); g(X); } while (0)#define FOO(X) if (1) { f(X); g(X); } else它的意义是什么,又有哪些意想不到的好处?2. 引入2.1 条件语句引起的逻辑错误上面例子若使用上诉规则,而直接表达:#define FOO(X) f(X); g(X)现在,如果 FOO(X) 在 if ...

2021-01-30 17:53:21 172

原创 博客同时部署Github和Coding page

吐槽下,coding page更新界面真的官方文档不更新吗?真的吐了!!!前期注册账号不讲了,现在都是以团队注册。 注册完后,记得到团队设置里面,找到实名认证。(在初次使用静态网站服务前,需要团队拥有者完成实名认证)然后需要在个人设置里绑定邮箱和设置密码,顺便把公钥添加下。创建一个项目,然后点进这个项目中,部署静态网站在项目设置里吧持续部署开关打开。(这里参考官方文档找了好久找不到,TND官方文档真的Fucx)官方笑话:CODING 静态网站服务...

2020-10-25 10:40:01 201

原创 c++ 面试笔记(长期更新)

1.map的底层是怎么实现的?map与hashmap的区别?什么时候应该使用map什么时候应该使用hashmap?map底层是使用红黑树RB-tree(非严格平衡二叉搜索树)实现的。hashmap在STL中称为unordered_map,使用哈希表hash实现的。unordered_map(等价于hash_map)和map类似,都是存储的key-value的值,可以通过key快速索引到value。不同的是红黑树具有自动排序的功能,因此map内部的所有元素都是有序的。而基于哈希表,数据插入和查找的时

2020-09-13 19:11:13 174

原创 动态规划 Dynamic programming

文章目录一、前言二、优点三、引申1. [coin-change](https://leetcode.com/problems/coin-change/solution/) 换零钱问题2. [Minimum Path Sum](https://leetcode.com/problems/minimum-path-sum/) 最小路径问题3. [Partition Equal Subset Sum](https://leetcode.com/problems/partition-equal-subset-sum

2020-09-13 15:17:13 1626

原创 计算机组成原理笔记

一、计算机的基本组成完成一条指令分为了三个阶段:取指令-分析指令-执行指令。下面我们分析上图的取数指令。(取数指令 ≠ 取指令 , 取数指令需要实施取指令、分析指令)取指令要执行的指令的地址我们是保存在PC当中的,取数指令这条指令的地址是保存在存储体当中的。所以,取指令的第一个操作,就是PC(PC给出了取数指令这条指令它所在的内存单元地址)要把指令的地址送给MAR,再由MAR送给存储体。在控制器的控制下,存储体把指定存储体中保存那条取数指令取出送到MDR中。取出的指令送到IR(IR的功能就是

2020-07-05 15:51:29 12175 1

翻译 Curiously recurring template pattern ( 奇怪的重复模板模式,CRTP)

CRTP是 C++中的一种技术,其中Derived类从类模板Base派生。关键是Base已派生作为模板参数。template<class T>class Base{...};class Derived : public Base<Derived>{...};CRTP是仅在需要时才实例化类模板的方法,使用静态多态方式。静态多态与动态多态非常相似。但是与使用虚拟方法的动态多态性相反,方法调用的调度将在编译时进行。// crtp.cpp#include <

2020-05-16 19:36:52 477

翻译 Deduction Guides (since C++17)

History在C++98中,使用类模板时,即使从使用中可以明显看出它们的类型,也总是必须提供模板参数:std::pair<int, std::string> p(1729, "taxicab");随着C ++ 11中auto的引入,情况发生了一些变化。可以使用(预先存在的)辅助函数make_pair创建变量,从而避免重复类型:#include <iostream>#include <type_traits>#include <utility>

2020-05-10 23:45:58 632

翻译 Class template argument deduction (CTAD) (since C++17)

history在C++98中,使用类模板时,即使从使用中可以明显看出它们的类型,也总是必须提供模板参数:std::pair<int, std::string> p(1729, "taxicab");随着C ++ 11中auto的引入,情况发生了一些变化。可以使用(预先存在的)辅助函数make_pair创建变量,从而避免重复类型:#include <iostream>#include <type_traits>#include <utility>

2020-05-10 23:25:26 1421

翻译 The overload Pattern

最近研究有关C ++ 17的书和博客文章时,偶然发现了这种访问模式std::variant:#include <iostream>#include <string>using namespace std;template<class... Ts> struct overloaded : Ts... { using Ts::operator()...;...

2020-04-30 00:12:16 392

转载 C++17 type-safe 的 union:variant

转载自:https://kheresy.wordpress.com/2017/10/16/cpp17-variant/前言std::variant 是 C++17 中,一個新加入標準函式庫的 template 容器;他的概念基本上是和 union(參考)一樣,是一個可以用來儲存多種型別資料的容器。比如說:std::variant<int, double> v;就代表 v ...

2020-04-28 23:12:09 611

原创 Flexible Array - 柔性数组

灵活数组成员是一种特殊的数组类型,其中具有多个命名成员的结构的最后一个元素具有不完整的数组类型;也就是说,数组的大小未在结构中明确指定。这种“struct hack”在实践中得到了广泛使用,并得到了各种编译器的支持。因此,已经使用了各种不同的语法来声明灵活的数组成员。对于符合标准的C实现,请使用C标准保证有效的语法。the C Standard, 6.7.2.1, paragraph 18中定...

2020-04-27 22:19:58 1007 1

原创 pimple idiom

我们知道,当对头文件进行更改时,包括它的所有源都需要重新编译。在大型项目和库中,由于即使对实现进行了很小的更改,每个人都必须等待一段时间才能编译代码,这可能会导致构建时间问题。解决此问题的一种方法是使用PImpl Idiom,它将实现隐藏在hearer中,并包括一个可立即编译的接口文件。The PImpl Idiom (Pointer to IMPLementation) 是一种用于将实现与接...

2020-04-23 23:17:58 369

翻译 Liskov substitution principle (里氏替換原則)

文章目录背景Tom's Penguin Problem背景可替代性是面向对象程序设计中的一项原则,其指出在计算机程序中,如果S是T的子类型,则类型T的对象可以用类型S的对象替换 (即类型T的对象可以用子类型S的任何对象替换 (i.e.向上转型))而不更改程序的任何期望属性(正确性,任务执行等)。更正式地讲,Liskov替换原理(LSP)是子类型关系的特定定义,称为(强)行为子类型化,最初是由...

2020-04-23 20:03:25 487

原创 Object slicing(对象切片)

关于对象切片Thinking in C++中有这么一段话:If you upcast to an object instead of a pointer or reference, something will happen that may surprise you: the object is “sliced” until all that remains is the subobject...

2020-04-21 22:50:54 1110 2

翻译 Most vexing parse (最烦人的解析)

Most vexing parse 在 Scott Meyers 在 Effective STL(2001)中 首次使用 。它在 C++ language standard 的 8.2节中正式定义。Example with classesAn example is:#include <iostream>class Timer {public: Timer(){};};...

2020-04-21 21:01:22 317

翻译 Monads in C++ (函数编程)

C ++中的Monad?帖子的名字真奇怪。但这并不奇怪。使用std :: optional C ++ 17可获得monad。Eric Niebler的范围库和扩展的期货也是monads。对于这两者,我们都可以期望在C ++ 20中实现。Bjarne Stroustrup在2016年C ++会议上的“秘密闪电演讲”中介绍了Concepts Lite的一些概念,这些概念我们很可能会在C ++ 20中...

2020-04-12 23:16:41 1023

翻译 monadic optional expressions(使用可选monad进行多重错误处理)

错误处理是编程中一个广泛的主题,尤其是在C ++中。我今天想向您介绍的方面是如何处理多个错误。让我们考虑以下4个功能:int f1(int a);int f2(int b, int c);int f3(int d);int f4(int e);f4( f4( f3( f2( f1(42), f1(55) ) ) ) )应该依次调用这些函数:将f1的结果(两次调用)传递给f2,然后...

2020-04-12 15:29:25 219

翻译 Event Handling and Condition Variables

本文中我们将讨论多线程中事件处理的需求以及使用条件变量实现功能。Event Handling有时,线程需要等待事件发生,例如条件变为真或任务由另一个线程完成。例如,假设我们正在构建一个基于网络的应用程序。该应用程序执行以下任务,与服务器进行一些握手从XML文件加载数据。对从XML加载的数据进行处理。正如我们看到的,任务1不依赖于任何其他任务,而任务3依赖于任务2。因此,这意味着任务...

2020-04-05 00:16:49 162

原创 std::mem_fn 成员指针包装器

std::mem_fn类成员函数指针(member function pointer),是C++语言的一类指针数据类型,用于存储一个指定类具有给定的形参列表与返回值类型的成员函数的访问信息。基本上要注意的有两点:函数指针赋值要使用 & 。( 与静态成员函数或自由函数不同,非静态成员函数不会隐式转换为成员函数指针(this)。)使用 .*(实例对象)或者 ->*(实例对...

2020-04-04 19:22:11 1226

燕十八mysql笔记.doc

燕十八mysql笔记,关于mysql增删改查,连接,组等。

2020-06-11

Google C++ International Standard.pdf

Contents Contents ii List of Tables x List of Figures xiv 1 Scope 1 2 Normative references 2 3 Terms and definitions 3 4 General principles 7 4.1 Implementation compliance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 4.2 Structure of this document . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 4.3 Syntax notation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 4.4 The C++ memory model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 4.5 The C++ object model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 4.6 Program execution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 4.7 Multi-threaded executions and data races . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 4.8 Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 5 Lexical conventions 22 5.1 Separate translation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 5.2 Phases of translation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 5.3 Character sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 5.4 Preprocessing tokens . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 5.5 Alternative tokens . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 5.6 Tokens . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 5.7 Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 5.8 Header names . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 5.9 Preprocessing numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 5.10 Identifiers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 5.11 Keywords . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 5.12 Operators and punctuators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 5.13 Literals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 6 Basic concepts 39 6.1 Declarations and definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 6.2 One-definition rule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 6.3 Scope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 6.4 Name lookup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 6.5 Program and linkage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 6.6 Start and termination . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66 6.7 Storage duration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70 6.8 Object lifetime . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74 Contents ii ©ISO/IEC N4659 6.9 Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77 6.10 Lvalues and rvalues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83 6.11 Alignment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84 7 Standard conversions 86 7.1 Lvalue-to-rvalue conversion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87 7.2 Array-to-pointer conversion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87 7.3 Function-to-pointer conversion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88 7.4 Temporary materialization conversion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88 7.5 Qualification conversions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88 7.6 Integral promotions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89 7.7 Floating-point promotion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89 7.8 Integral conversions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89 7.9 Floating-point conversions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90 7.10 Floating-integral conversions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90 7.11 Pointer conversions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90 7.12 Pointer to member conversions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90 7.13 Function pointer conversions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91 7.14 Boolean conversions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91 7.15 Integer conversion rank . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91 8 Expressions 93 8.1 Primary expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96 8.2 Postfix expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108 8.3 Unary expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120 8.4 Explicit type conversion (cast notation) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129 8.5 Pointer-to-member operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130 8.6 Multiplicative operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131 8.7 Additive operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131 8.8 Shift operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132 8.9 Relational operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133 8.10 Equality operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133 8.11 Bitwise AND operator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135 8.12 Bitwise exclusive OR operator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135 8.13 Bitwise inclusive OR operator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135 8.14 Logical AND operator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135 8.15 Logical OR operator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135 8.16 Conditional operator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136 8.17 Throwing an exception . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137 8.18 Assignment and compound assignment operators . . . . . . . . . . . . . . . . . . . . . . . 138 8.19 Comma operator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139 8.20 Constant expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139 9 Statements 144 9.1 Labeled statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145 9.2 Expression statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145 9.3 Compound statement or block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145 9.4 Selection statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145 9.5 Iteration statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147 9.6 Jump statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150 9.7 Declaration statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152 Contents iii ©ISO/IEC N4659 9.8 Ambiguity resolution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152 10 Declarations 155 10.1 Specifiers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157 10.2 Enumeration declarations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174 10.3 Namespaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178 10.4 The asm declaration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191 10.5 Linkage specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191 10.6 Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194 11 Declarators 201 11.1 Type names . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202 11.2 Ambiguity resolution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203 11.3 Meaning of declarators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204 11.4 Function definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216 11.5 Structured binding declarations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219 11.6 Initializers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220 12 Classes 237 12.1 Class names . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239 12.2 Class members . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241 12.3 Unions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251 12.4 Local class declarations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 254 13 Derived classes 256 13.1 Multiple base classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257 13.2 Member name lookup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259 13.3 Virtual functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 262 13.4 Abstract classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266 14 Member access control 269 14.1 Access specifiers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 270 14.2 Accessibility of base classes and base class members . . . . . . . . . . . . . . . . . . . . . . 271 14.3 Friends . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274 14.4 Protected member access . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277 14.5 Access to virtual functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 278 14.6 Multiple access . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 278 14.7 Nested classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 278 15 Special member functions 280 15.1 Constructors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 280 15.2 Temporary objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283 15.3 Conversions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285 15.4 Destructors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 288 15.5 Free store . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 291 15.6 Initialization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 293 15.7 Construction and destruction . . . . . . . . . . . . . . . . . . . . . . . . ©ISO/IEC N4659 16.3 Overload resolution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 314 16.4 Address of overloaded function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 335 16.5 Overloaded operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 336 16.6 Built-in operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 341 17 Templates 344 17.1 Template parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 345 17.2 Names of template specializations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 349 17.3 Template arguments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 350 17.4 Type equivalence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 356 17.5 Template declarations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 357 17.6 Name resolution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 375 17.7 Template instantiation and specialization . . . . . . . . . . . . . . . . . . . . . . . . . . . 390 17.8 Function template specializations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 402 17.9 Deduction guides . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 423 18 Exception handling 424 18.1 Throwing an exception . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 425 18.2 Constructors and destructors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 427 18.3 Handling an exception . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 427 18.4 Exception specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 429 18.5 Special functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 432 19 Preprocessing directives 434 19.1 Conditional inclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 435 19.2 Source file inclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 437 19.3 Macro replacement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 438 19.4 Line control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 443 19.5 Error directive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 444 19.6 Pragma directive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 444 19.7 Null directive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 444 19.8 Predefined macro names . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 444 19.9 Pragma operator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 446 20 Library introduction 447 20.1 General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 447 20.2 The C standard library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 448 20.3 Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 448 20.4 Method of description (Informative) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 451 20.5 Library-wide requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 456 21 Language support library 478 21.1 General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 478 21.2 Common definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 478 21.3 Implementation properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 483 21.4 Integer types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 492 21.5 Start and termination . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 493 21.6 Dynamic memory management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 494 21.7 Type identification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 502 21.8 Exception handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 504 21.9 Initializer lists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 509 Contents v ©ISO/IEC N4659 21.10 Other runtime support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 510 22 Diagnostics library 513 22.1 General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 513 22.2 Exception classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 513 22.3 Assertions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 517 22.4 Error numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 517 22.5 System error support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 519 23 General utilities library 530 23.1 General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 530 23.2 Utility components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 530 23.3 Compile-time integer sequences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 538 23.4 Pairs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 539 23.5 Tuples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 543 23.6 Optional objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 554 23.7 Variants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 569 23.8 Storage for any type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 582 23.9 Bitsets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 587 23.10 Memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 594 23.11 Smart pointers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 609 23.12 Memory resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 635 23.13 Class template scoped_allocator_adaptor . . . . . . . . . . . . . . . . . . . . . . . . . . 646 23.14 Function objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 652 23.15 Metaprogramming and type traits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 676 23.16 Compile-time rational arithmetic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 702 23.17 Time utilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 705 23.18 Class type_index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 722 23.19 Execution policies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 723 24 Strings library 726 24.1 General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 726 24.2 Character traits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 726 24.3 String classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 732 24.4 String view classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 766 24.5 Null-terminated sequence utilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 776 25 Localization library 782 25.1 General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 782 25.2 Header synopsis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 782 25.3 Locales . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 784 25.4 Standard locale categories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 791 25.5 C library locales . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 829 26 Containers library 830 26.1 General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 830 26.2 Container requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 830 26.3 Sequence containers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 868 26.4 Associative containers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 900 26.5 Unordered associative containers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 921 26.6 Container adaptors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 945 Contents vi ©ISO/IEC N4659 27 Iterators library 955 27.1 General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 955 27.2 Iterator requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 955 27.3 Header synopsis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 961 27.4 Iterator primitives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 964 27.5 Iterator adaptors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 967 27.6 Stream iterators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 980 27.7 Range access . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 987 27.8 Container access . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 988 28 Algorithms library 989 28.1 General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 989 28.2 Header synopsis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 989 28.3 Algorithms requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1008 28.4 Parallel algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1009 28.5 Non-modifying sequence operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1012 28.6 Mutating sequence operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1020 28.7 Sorting and related operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1030 28.8 C library algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1049 29 Numerics library 1050 29.1 General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1050 29.2 Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1050 29.3 Numeric type requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1050 29.4 The floating-point environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1051 29.5 Complex numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1052 29.6 Random number generation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1062 29.7 Numeric arrays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1105 29.8 Generalized numeric operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1125 29.9 Mathematical functions for floating-point types . . . . . . . . . . . . . . . . . . . . . . . . 1139 30 Input/output library 1157 30.1 General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1157 30.2 Iostreams requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1158 30.3 Forward declarations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1158 30.4 Standard iostream objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1160 30.5 Iostreams base classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1162 30.6 Stream buffers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1179 30.7 Formatting and manipulators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1188 30.8 String-based streams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1214 30.9 File-based streams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1225 30.10 File systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1239 30.11 C library files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1293 31 Regular expressions library 1297 31.1 General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1297 31.2 Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1297 31.3 Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1298 31.4 Header synopsis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1300 31.5 Namespace std::regex_constants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1306 31.6 Class regex_error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1309 Contents vii ©ISO/IEC N4659 31.7 Class template regex_traits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1310 31.8 Class template basic_regex . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1312 31.9 Class template sub_match . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1318 31.10 Class template match_results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1323 31.11 Regular expression algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1328 31.12 Regular expression iterators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1333 31.13 Modified ECMAScript regular expression grammar . . . . . . . . . . . . . . . . . . . . . . 1339 32 Atomic operations library 1342 32.1 General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1342 32.2 Header synopsis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1342 32.3 Type aliases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1346 32.4 Order and consistency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1346 32.5 Lock-free property . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1348 32.6 Class template atomic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1348 32.7 Non-member functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1356 32.8 Flag type and operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1356 32.9 Fences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1357 33 Thread support library 1359 33.1 General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1359 33.2 Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1359 33.3 Threads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1362 33.4 Mutual exclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1367 33.5 Condition variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1388 33.6 Futures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1395 A Grammar summary 1412 A.1 Keywords . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1412 A.2 Lexical conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1412 A.3 Basic concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1417 A.4 Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1417 A.5 Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1421 A.6 Declarations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1422 A.7 Declarators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1426 A.8 Classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1428 A.9 Derived classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1429 A.10 Special member functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1430 A.11 Overloading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1430 A.12 Templates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1430 A.13 Exception handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1431 A.14 Preprocessing directives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1432 B Implementation quantities 1434 C Compatibility 1436 C.1 C++ and ISO C . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1436 C.2 C++ and ISO C++ 2003 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1445 C.3 C++ and ISO C++ 2011 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1451 C.4 C++ and ISO C++ 2014 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1453 C.5 C standard library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1457 Contents viii ©ISO/IEC N4659 D Compatibility features 1460 D.1 Redeclaration of static constexpr data members . . . . . . . . . . . . . . . . . . . . . . 1460 D.2 Implicit declaration of copy functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1460 D.3 Deprecated exception specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1460 D.4 C++ standard library headers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1460 D.5 C standard library headers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1461 D.6 char* streams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1461 D.7 uncaught_exception . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1470 D.8 Old adaptable function bindings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1470 D.9 The default allocator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1475 D.10 Raw storage iterator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1476 D.11 Temporary buffers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1478 D.12 Deprecated type traits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1478 D.13 Deprecated iterator primitives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1479 D.14 Deprecated shared_ptr observers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1479 D.15 Deprecated standard code conversion facets . . . . . . . . . . . . . . . . . . . . . . . . . . 1479 D.16 Deprecated convenience conversion interfaces . . . . . . . . . . . . . . . . . . . . . . . . . 1481 Cross references 1486 Cross references from ISO C++ 2014 1507 Index 1509 Index of grammar productions 1542 Index of library names 1546 Index of implementation-defined behavior 1604 Contents ix ©ISO/IEC N4659 List of Tables 1 Alternative tokens . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 2 Ranges of characters allowed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 3 Ranges of characters disallowed initially (combining characters) . . . . . . . . . . . . . . . . . . 27 4 Identifiers with special meaning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 5 Keywords . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 6 Alternative representations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 7 Types of integer literals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 8 Escape sequences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 9 String literal concatenations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 10 Relations on const and volatile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83 11 simple-type-specifiers and the types they specify . . . . . . . . . . . . . . . . . . . . . . . . . . 168 12 Relationship between operator and function call notation . . . . . . . . . . . . . . . . . . . . . 319 13 Conversions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 328 14 Value of folding empty sequences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 363 15 Library categories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 447 16 C++ library headers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 457 17 C++ headers for C library facilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 457 18 C standard Annex K names . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 458 19 C++ headers for freestanding implementations . . . . . . . . . . . . . . . . . . . . . . . . . . . . 459 20 EqualityComparable requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 460 21 LessThanComparable requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 460 22 DefaultConstructible requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 460 23 MoveConstructible requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 460 24 CopyConstructible requirements (in addition to MoveConstructible) . . . . . . . . . . . . . 461 25 MoveAssignable requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 461 26 CopyAssignable requirements (in addition to MoveAssignable) . . . . . . . . . . . . . . . . . 461 27 Destructible requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 461 28 NullablePointer requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 463 29 Hash requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 464 30 Descriptive variable definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 464 31 Allocator requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 465 32 Language support library summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 478 33 Diagnostics library summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 513 34 General utilities library summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 530 35 optional::operator=(const optional&) effects . . . . . . . . . . . . . . . . . . . . . . . . . 560 36 optional::operator=(optional&&) effects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 560 37 optional::operator=(const optional&) effects . . . . . . . . . . . . . . . . . . . . . . . 561 38 optional::operator=(optional&&) effects . . . . . . . . . . . . . . . . . . . . . . . . . . . 562 List of Tables x ©ISO/IEC N4659 39 optional::swap(optional&) effects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 564 40 Primary type category predicates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 684 41 Composite type category predicates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 685 42 Type property predicates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 686 43 Type property queries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 693 44 Type relationship predicates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 694 45 Const-volatile modifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 695 46 Reference modifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 696 47 Sign modifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 697 48 Array modifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 698 49 Pointer modifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 698 50 Other transformations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 699 51 Expressions used to perform ratio arithmetic . . . . . . . . . . . . . . . . . . . . . . . . . . . . 704 52 Clock requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 708 53 Strings library summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 726 54 Character traits requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 727 55 basic_string(const Allocator&) effects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 742 56 basic_string(const basic_string&) effects . . . . . . . . . . . . . . . . . . . . . . . . . . . 742 57 basic_string(const basic_string&, size_type, const Allocator&) and basic_string(const basic_string&, size_type, size_type, const Allocator&) effects 742 58 basic_string(const charT*, size_type, const Allocator&) effects . . . . . . . . . . . . . 743 59 basic_string(const charT*, const Allocator&) effects . . . . . . . . . . . . . . . . . . . . 743 60 basic_string(size_t, charT, const Allocator&) effects . . . . . . . . . . . . . . . . . . . 744 61 basic_string(const basic_string&, const Allocator&) and basic_string(basic_string&&, const Allocator&) effects . . . . . . . . . . . . . . . . 744 62 operator=(const basic_string&) effects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 745 63 compare() results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 759 64 basic_string_view(const charT*) effects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 770 65 basic_string_view(const charT*, size_type) effects . . . . . . . . . . . . . . . . . . . . . 770 66 compare() results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 773 67 Additional basic_string_view comparison overloads . . . . . . . . . . . . . . . . . . . . . . . 775 68 Localization library summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 782 69 Locale category facets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 786 70 Required specializations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 787 71 do_in/do_out result values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 800 72 do_unshift result values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 800 73 Integer conversions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 804 74 Length modifier . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 804 75 Integer conversions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 808 76 Floating-point conversions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 808 77 Length modifier . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 808 78 Numeric conversions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 808 79 Fill padding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 809 80 do_get_date effects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 816 81 Potential setlocale data races . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 829 82 Containers library summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 830 83 Container requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 831 84 Reversible container requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 834 List of Tables xi ©ISO/IEC N4659 85 Optional container operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 835 86 Allocator-aware container requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 836 87 Sequence container requirements (in addition to container) . . . . . . . . . . . . . . . . . . . . 838 88 Optional sequence container operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 841 89 Container types with compatible nodes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 843 90 Associative container requirements (in addition to container) . . . . . . . . . . . . . . . . . . . 846 91 Unordered associative container requirements (in addition to container) . . . . . . . . . . . . . 857 92 Iterators library summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 955 93 Relations among iterator categories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 955 94 Iterator requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 957 95 Input iterator requirements (in addition to Iterator) . . . . . . . . . . . . . . . . . . . . . . . . 957 96 Output iterator requirements (in addition to Iterator) . . . . . . . . . . . . . . . . . . . . . . . 958 97 Forward iterator requirements (in addition to input iterator) . . . . . . . . . . . . . . . . . . . 959 98 Bidirectional iterator requirements (in addition to forward iterator) . . . . . . . . . . . . . . . . 960 99 Random access iterator requirements (in addition to bidirectional iterator) . . . . . . . . . . . 961 100 Algorithms library summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 989 101 Numerics library summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1050 102 Seed sequence requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1063 103 Uniform random bit generator requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1064 104 Random number engine requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1065 105 Random number distribution requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1069 106 Input/output library summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1157 107 fmtflags effects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1167 108 fmtflags constants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1167 109 iostate effects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1167 110 openmode effects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1167 111 seekdir effects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1168 112 Position type requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1172 113 basic_ios::init() effects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1174 114 basic_ios::copyfmt() effects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1175 115 seekoff positioning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1219 116 newoff values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1219 117 File open modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1229 118 seekoff effects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1231 119 filesystem_error(const string&, error_code) effects . . . . . . . . . . . . . . . . . . . . . 1264 120 filesystem_error(const string&, const path&, error_code) effects . . . . . . . . . . . . 1264 121 filesystem_error(const string&, const path&, const path&, error_code) effects . . . 1265 122 Enum path::format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1265 123 Enum class file_type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1266 124 Enum class copy_options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1266 125 Enum class perms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1267 126 Enum class perm_options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1267 127 Enum class directory_options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1268 128 Regular expressions library summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1297 129 Regular expression traits class requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1298 130 syntax_option_type effects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1307 List of Tables xii ©ISO/IEC N4659 131 regex_constants::match_flag_type effects when obtaining a match against a character container sequence [first, last). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1308 132 error_type values in the C locale . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1309 133 Character class names and corresponding ctype masks . . . . . . . . . . . . . . . . . . . . . . . 1313 134 match_results assignment operator effects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1325 135 Effects of regex_match algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1329 136 Effects of regex_search algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1330 137 Atomics library summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1342 138 Atomic arithmetic computations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1353 139 Atomic pointer computations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1355 140 Thread support library summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1359 141 C headers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1461 142 strstreambuf(streamsize) effects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1463 143 strstreambuf(void* (*)(size_t), void (*)(void*)) effects . . . . . . . . . . . . . . . . . 1463 144 strstreambuf(charT*, streamsize, charT*) effects . . . . . . . . . . . . . . . . . . . . . . . 1464 145 seekoff positioning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1466 146 newoff values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1466 List of Tables xiii ©ISO/IEC N4659 List of Figures 1 Expression category taxonomy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83 2 Directed acyclic graph . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257 3 Non-virtual base . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 258 4 Virtual base . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 258 5 Virtual and non-virtual base . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259

2018-12-27

GX-work2-入门手册

三菱公司的GX-work2软件入门指南。 包括创建程序,SFC梯形图,程序块,结构化工程等内容。

2018-11-19

三菱PLC FX系列用户手册

三菱PLC用户手册,包含元器件介绍、基本指令、寄存器等

2018-11-07

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除