ImageVerifierCode 换一换
格式:PDF , 页数:1620 ,大小:9.13MB ,
资源ID:436183      下载积分:10000 积分
快捷下载
登录下载
邮箱/手机:
温馨提示:
如需开发票,请勿充值!快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。
如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝扫码支付 微信扫码支付   
注意:如需开发票,请勿充值!
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【http://www.mydoc123.com/d-436183.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(ANSI INCITS ISO IEC 14882-2017 Programming languages - C++.pdf)为本站会员(outsidejudge265)主动上传,麦多课文库仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知麦多课文库(发送邮件至master@mydoc123.com或直接QQ联系客服),我们立即给予删除!

ANSI INCITS ISO IEC 14882-2017 Programming languages - C++.pdf

1、 INCITS/ISO/IEC 14882:2017 (2018) (ISO/IEC 14882:2017, IDT) Programming languages - C+ INCITS/ISO/IEC 14882:2017 (2018) PDF disclaimer This PDF file may contain embedded typefaces. In accordance with Adobes licensing policy, this file may be printed or viewed but shall not be edited unless the typef

2、aces which are embedded are licensed to and installed on the computer performing the editing. In downloading this file, parties accept therein the responsibility of not infringing Adobes licensing policy. The ISO Central Secretariat accepts no liability in this area. Adobe is a trademark of Adobe Sy

3、stems Incorporated. Details of the software products used to create this PDF file can be found in the General Info relative to the file; the PDF-creation parameters were optimized for printing. Every care has been taken to ensure that the file is suitable for use by ISO member bodies. In the unlikel

4、y event that a problem relating to it is found, please inform the Central Secretariat at the address given below. Adopted by INCITS (InterNational Committee for Information Technology Standards) as an American National Standard. Date of ANSI Approval: 6/29/2018 Published by American National Standar

5、ds Institute, 25 West 43rd Street, New York, New York 10036 Copyright 2018 by Information Technology Industry Council (ITI). All rights reserved. These materials are subject to copyright claims of International Standardization Organization (ISO), International Electrotechnical Commission (IEC), Amer

6、ican National Standards Institute (ANSI), and Information Technology Industry Council (ITI). Not for resale. No part of this publication may be reproduced in any form, including an electronic retrieval system, without the prior written permission of ITI. All requests pertaining to this standard shou

7、ld be submitted to ITI, 1101 K Street NW, Suite 610, Washington DC 20005. Printed in the United States of America ii ITIC 2018 All rights reserved Programming languages C+Langages de programmation C+INTERNATIONAL STANDARDISO/IEC14882Reference numberISO/IEC 14882:2017(E)Fifth edition2017-12 ISO/IEC 2

8、017ii ISO/IEC 2017 All rights reservedCOPYRIGHT PROTECTED DOCUMENT ISO/IEC 2017, Published in SwitzerlandAll rights reserved. Unless otherwise specified, no part of this publication may be reproduced or utilized otherwise in any form or by any means, electronic or mechanical, including photocopying,

9、 or posting on the internet or an intranet, without prior written permission. Permission can be requested from either ISO at the address below or ISOs member body in the country of the requester.ISO copyright officeCh. de Blandonnet 8 CP 401CH-1214 Vernier, Geneva, SwitzerlandTel. +41 22 749 01 11Fa

10、x +41 22 749 09 47copyrightiso.orgwww.iso.orgISO/IEC 14882:2017(E)ISO/IEC 14882:2017(E)ContentsForeword xi1 Scope 12 Normative references 23 Terms and definitions 34 General principles 74.1 Implementation compliance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74.2 Structure

11、 of this document . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84.3 Syntax notation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84.4 The C+ memory model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84.5 T

12、he C+ object model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94.6 Program execution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114.7 Multi-threaded executions and data races . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

13、54.8 Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205 Lexical conventions 225.1 Separate translation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225.2 Phases of translation . . . . . . . . . . . . . . . . . . . .

14、 . . . . . . . . . . . . . . . . . . 225.3 Character sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235.4 Preprocessing tokens . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245.5 Alternative tokens . . . . . . . . . . . . .

15、 . . . . . . . . . . . . . . . . . . . . . . . . . . . 255.6 Tokens . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255.7 Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265.8 Header names . . . . . . .

16、 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265.9 Preprocessing numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265.10 Identifiers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275.11 Keywords

17、 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285.12 Operators and punctuators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 295.13 Literals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

18、 296 Basic concepts 396.1 Declarations and definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 396.2 One-definition rule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 416.3 Scope . . . . . . . . . . . . . . . . . . . . . . . . . . . .

19、 . . . . . . . . . . . . . . . . . . 446.4 Name lookup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 506.5 Program and linkage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 636.6 Start and termination . . . . . . . . . . . . .

20、 . . . . . . . . . . . . . . . . . . . . . . . . 666.7 Storage duration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 706.8 Object lifetime . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 746.9 Types . . . . . . . . . . . . . .

21、 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 776.10 Lvalues and rvalues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 836.11 Alignment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84Contents ISO/IEC

22、2017 All rights reserved iiiISO/IEC 14882:2017(E)7 Standard conversions 867.1 Lvalue-to-rvalue conversion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 877.2 Array-to-pointer conversion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 877.3 Function-to-po

23、inter conversion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 887.4 Temporary materialization conversion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 887.5 Qualification conversions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 887.6 In

24、tegral promotions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 897.7 Floating-point promotion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 897.8 Integral conversions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

25、 . . . 897.9 Floating-point conversions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 907.10 Floating-integral conversions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 907.11 Pointer conversions . . . . . . . . . . . . . . . . . . . . . . . . . . .

26、 . . . . . . . . . . . . . 907.12 Pointer to member conversions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 907.13 Function pointer conversions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 917.14 Boolean conversions . . . . . . . . . . . . . . . . . . .

27、 . . . . . . . . . . . . . . . . . . . . 917.15 Integer conversion rank . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 918 Expressions 938.1 Primary expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 968.2 Postfix expressions . . .

28、 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1098.3 Unary expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1208.4 Explicit type conversion (cast notation) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1298.5 Pointer-

29、to-member operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1308.6 Multiplicative operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1318.7 Additive operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

30、1318.8 Shift operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1328.9 Relational operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1338.10 Equality operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

31、 . . . . . . . . . 1338.11 Bitwise AND operator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1358.12 Bitwise exclusive OR operator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1358.13 Bitwise inclusive OR operator . . . . . . . . . . . . . . . .

32、 . . . . . . . . . . . . . . . . . . 1358.14 Logical AND operator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1358.15 Logical OR operator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1358.16 Conditional operator . . . . . . . . . . . .

33、 . . . . . . . . . . . . . . . . . . . . . . . . . . . 1368.17 Throwing an exception . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1378.18 Assignment and compound assignment operators . . . . . . . . . . . . . . . . . . . . . . . 1378.19 Comma operator . . . . . . . . .

34、 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1388.20 Constant expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1399 Statements 1449.1 Labeled statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1459.2

35、Expression statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1459.3 Compound statement or block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1459.4 Selection statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

36、 . . . 1459.5 Iteration statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1489.6 Jump statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1509.7 Declaration statement . . . . . . . . . . . . . . . . . . . . . . . . . .

37、 . . . . . . . . . . . 1529.8 Ambiguity resolution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153Contents ISO/IEC 2017 All rights reserved ivISO/IEC 14882:2017(E)10 Declarations 15510.1 Specifiers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

38、 . . . . . . . . . . . 15710.2 Enumeration declarations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17410.3 Namespaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17810.4 The asm declaration . . . . . . . . . . . . . . . . . . .

39、 . . . . . . . . . . . . . . . . . . . . 19110.5 Linkage specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19110.6 Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19411 Declarators 20111.1 Type names . . .

40、 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20211.2 Ambiguity resolution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20311.3 Meaning of declarators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2041

41、1.4 Function definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21611.5 Structured binding declarations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21911.6 Initializers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

42、 . . . . . . . . . . 22012 Classes 23712.1 Class names . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23912.2 Class members . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24112.3 Unions . . . . . . . . . . . . . . . . . .

43、 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25112.4 Local class declarations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25413 Derived classes 25513.1 Multiple base classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2561

44、3.2 Member name lookup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25813.3 Virtual functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26113.4 Abstract classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

45、 . . . . . . . 26514 Member access control 26714.1 Access specifiers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26814.2 Accessibility of base classes and base class members . . . . . . . . . . . . . . . . . . . . . . 26914.3 Friends . . . . . . . . . . . . .

46、 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27214.4 Protected member access . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27514.5 Access to virtual functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27614.6 Multiple

47、access . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27614.7 Nested classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27615 Special member functions 27815.1 Constructors . . . . . . . . . . . . . . . . . . . . . . . .

48、 . . . . . . . . . . . . . . . . . . 27815.2 Temporary objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28115.3 Conversions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28315.4 Destructors . . . . . . . . . . . . . .

49、 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28615.5 Free store . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28915.6 Initialization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29115.7 Construction and destruction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29815.8 Copying and moving class objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

copyright@ 2008-2019 麦多课文库(www.mydoc123.com)网站版权所有
备案/许可证编号:苏ICP备17064731号-1