没有合适的资源?快使用搜索试试~ 我知道了~
首页ISO/IEC 14882:2003 C++03 C++标准 英文版 PDF 非扫描版
ISO/IEC 14882:2003 C++03 C++标准 英文版 PDF 非扫描版
需积分: 35 41 下载量 28 浏览量
更新于2023-03-16
评论 2
收藏 2.01MB PDF 举报
ISO/IEC 14882:2003 C++03 C++标准 英文版 PDF 非扫描版 INTERNATIONAL ISO/IEC STANDARD 14882 Second edition 2003-04-01
资源详情
资源评论
资源推荐
INTERNATIONAL ISO/IEC
STANDARD 14882
Second edition
2003-04-01
________________________________________
________________________________________
________________________________________
Programming languages — C
+ +
Langages de programmation — C
+ +
________________________________________
________________________________________
________________________________________
Reference number
ISO/IEC 14882:2003(E)
ISO/IEC 14882:2003(E)
Contents
1 General ........................................................................................................................................................1
1.1 Scope........................................................................................................................................................1
1.2 Normative references ...............................................................................................................................1
1.3 Definitions ...............................................................................................................................................1
1.3.1 argument ...............................................................................................................................................1
1.3.2 diagnostic message ...............................................................................................................................2
1.3.3 dynamic type .........................................................................................................................................2
1.3.4 ill-formed program................................................................................................................................2
1.3.5 implementation-defined behavior .........................................................................................................2
1.3.6 implementation limits ...........................................................................................................................2
1.3.7 locale-specific behavior ........................................................................................................................2
1.3.8 multibyte character ...............................................................................................................................2
1.3.9 parameter ..............................................................................................................................................2
1.3.10 signature ..............................................................................................................................................2
1.3.11 static type ............................................................................................................................................2
1.3.12 undefined behavior .............................................................................................................................2
1.3.13 unspecified behavior ...........................................................................................................................3
1.3.14 well-formed program ..........................................................................................................................3
1.4 Implementation compliance.....................................................................................................................3
1.5 Structure of this International Standard ...................................................................................................4
1.6 Syntax notation ........................................................................................................................................4
1.7 The C + + memory model ...........................................................................................................................4
1.8 The C + + object model ..............................................................................................................................4
1.9 Program execution ...................................................................................................................................5
__________________
ii
ISO/IEC ISO/IEC 14882:2003(E)
1.10 Acknowledgments .................................................................................................................................8
2 Lexical conventions ....................................................................................................................................9
2.1 Phases of translation ................................................................................................................................9
2.2 Character sets .........................................................................................................................................10
2.3 Trigraph sequences ................................................................................................................................11
2.4 Preprocessing tokens .............................................................................................................................11
2.5 Alternative tokens ..................................................................................................................................12
2.6 Tokens....................................................................................................................................................12
2.7 Comments ..............................................................................................................................................12
2.8 Header names .........................................................................................................................................13
2.9 Preprocessing numbers ..........................................................................................................................13
2.10 Identifiers .............................................................................................................................................13
2.11 Keywords .............................................................................................................................................14
2.12 Operators and punctuators ...................................................................................................................15
2.13 Literals .................................................................................................................................................15
2.13.1 Integer literals ...................................................................................................................................15
2.13.2 Character literals ...............................................................................................................................16
2.13.3 Floating literals .................................................................................................................................18
2.13.4 String literals .....................................................................................................................................19
2.13.5 Boolean literals .................................................................................................................................19
3 Basic concepts ..........................................................................................................................................21
3.1 Declarations and definitions ..................................................................................................................21
3.2 One definition rule .................................................................................................................................22
3.3 Declarative regions and scopes ..............................................................................................................24
3.3.1 Point of declaration .............................................................................................................................25
3.3.2 Local scope .........................................................................................................................................26
3.3.3 Function prototype scope ....................................................................................................................26
3.3.4 Function scope ....................................................................................................................................27
3.3.5 Namespace scope ................................................................................................................................27
3.3.6 Class scope..........................................................................................................................................27
3.3.7 Name hiding........................................................................................................................................28
3.4 Name lookup ..........................................................................................................................................29
3.4.1 Unqualified name lookup ...................................................................................................................29
3.4.2 Argument-dependent name lookup .....................................................................................................32
3.4.3 Qualified name lookup .......................................................................................................................34
iii
ISO/IEC 14882:2003(E) ISO/IEC
3.4.3.1 Class members .................................................................................................................................35
3.4.3.2 Namespace members .......................................................................................................................35
3.4.4 Elaborated type specifiers ...................................................................................................................39
3.4.5 Class member access ..........................................................................................................................40
3.4.6 Using-directives and namespace aliases .............................................................................................41
3.5 Program and linkage ..............................................................................................................................41
3.6 Start and termination..............................................................................................................................43
3.6.1 Main function......................................................................................................................................43
3.6.2 Initialization of non-local objects .......................................................................................................44
3.6.3 Termination.........................................................................................................................................45
3.7 Storage duration .....................................................................................................................................46
3.7.1 Static storage duration ........................................................................................................................46
3.7.2 Automatic storage duration.................................................................................................................46
3.7.3 Dynamic storage duration ...................................................................................................................47
3.7.3.1 Allocation functions.........................................................................................................................47
3.7.3.2 Deallocation functions .....................................................................................................................48
3.7.4 Duration of sub-objects.......................................................................................................................48
3.8 Object Lifetime ......................................................................................................................................49
3.9 Types......................................................................................................................................................52
3.9.1 Fundamental types ..............................................................................................................................53
3.9.2 Compound types .................................................................................................................................55
3.9.3 CV-qualifiers ......................................................................................................................................55
3.10 Lvalues and rvalues .............................................................................................................................56
4 Standard conversions ................................................................................................................................59
4.1 Lvalue-to-rvalue conversion ..................................................................................................................59
4.2 Array-to-pointer conversion ..................................................................................................................60
4.3 Function-to-pointer conversion .............................................................................................................60
4.4 Qualification conversions ......................................................................................................................60
4.5 Integral promotions ................................................................................................................................61
4.6 Floating point promotion .......................................................................................................................61
4.7 Integral conversions ...............................................................................................................................62
4.8 Floating point conversions .....................................................................................................................62
4.9 Floating-integral conversions ................................................................................................................62
4.10 Pointer conversions ..............................................................................................................................62
4.11 Pointer to member conversions ...........................................................................................................63
iv
ISO/IEC ISO/IEC 14882:2003(E)
4.12 Boolean conversions ............................................................................................................................63
5 Expressions ...............................................................................................................................................65
5.1 Primary expressions ...............................................................................................................................66
5.2 Postfix expressions ................................................................................................................................68
5.2.1 Subscripting ........................................................................................................................................68
5.2.2 Function call .......................................................................................................................................68
5.2.3 Explicit type conversion (functional notation) ...................................................................................70
5.2.4 Pseudo destructor call .........................................................................................................................70
5.2.5 Class member access ..........................................................................................................................70
5.2.6 Increment and decrement ....................................................................................................................71
5.2.7 Dynamic cast ......................................................................................................................................72
5.2.8 Type identification ..............................................................................................................................73
5.2.9 Static cast ............................................................................................................................................74
5.2.10 Reinterpret cast .................................................................................................................................75
5.2.11 Const cast ..........................................................................................................................................76
5.3 Unary expressions ..................................................................................................................................78
5.3.1 Unary operators...................................................................................................................................78
5.3.2 Increment and decrement ....................................................................................................................79
5.3.3 Sizeof ..................................................................................................................................................79
5.3.4 New .....................................................................................................................................................80
5.3.5 Delete ..................................................................................................................................................83
5.4 Explicit type conversion (cast notation) ................................................................................................84
5.5 Pointer-to-member operators .................................................................................................................85
5.6 Multiplicative operators .........................................................................................................................85
5.7 Additive operators .................................................................................................................................86
5.8 Shift operators ........................................................................................................................................87
5.9 Relational operators ...............................................................................................................................87
5.10 Equality operators ................................................................................................................................88
5.11 Bitwise
AND operator ..........................................................................................................................89
5.12 Bitwise exclusive OR operator .............................................................................................................89
5.13 Bitwise inclusive OR operator .............................................................................................................89
5.14 Logical AND operator ..........................................................................................................................89
5.15 Logical
OR operator .............................................................................................................................90
5.16 Conditional operator ............................................................................................................................90
5.17 Assignment operators ..........................................................................................................................91
v
剩余782页未读,继续阅读
sfgassdfg
- 粉丝: 21
- 资源: 96
上传资源 快速赚钱
- 我的内容管理 收起
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
会员权益专享
最新资源
- c++校园超市商品信息管理系统课程设计说明书(含源代码) (2).pdf
- 建筑供配电系统相关课件.pptx
- 企业管理规章制度及管理模式.doc
- vb打开摄像头.doc
- 云计算-可信计算中认证协议改进方案.pdf
- [详细完整版]单片机编程4.ppt
- c语言常用算法.pdf
- c++经典程序代码大全.pdf
- 单片机数字时钟资料.doc
- 11项目管理前沿1.0.pptx
- 基于ssm的“魅力”繁峙宣传网站的设计与实现论文.doc
- 智慧交通综合解决方案.pptx
- 建筑防潮设计-PowerPointPresentati.pptx
- SPC统计过程控制程序.pptx
- SPC统计方法基础知识.pptx
- MW全能培训汽轮机调节保安系统PPT教学课件.pptx
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论0