ISO_IEC_14882_2017 Programming languages — C++

所需积分/C币:49 2018-04-27 08:16:14 30.87MB PDF
38
收藏 收藏
举报

ISO/IEC 14882:2017 specifies requirements for implementations of the C++ programming language. The first such requirement is that they implement the language, so this document also defines C++. Other requirements and relaxations of the first requirement appear at various places within this document. C++ is a general purpose programming language based on the C programming language as described in ISO/IEC 9899:2011 Programming languages ? C (hereinafter referred to as the C standard). In addition to the facilities provided by C, C++ provides additional data types, classes, templates, exceptions, namespaces, operator overloading, function name overloading, references, free store management operators, and additional library facilities.
IsO/IEC14882:2017(E) Contents Foreword 1 Scope 2 Normative references 3 Terms and definitions 4 Gcncral principles 4.1 Implementation compliance 4.2 Structure of this document 2377888 4,3 Syntax notation 4.4 The C++ memory model 4.5 The C++ object model 9 4.6 Program execution 4.7 Multi-threaded executions and data races 15 4. 8 Acknowl 5 Lexical conventions 22 5.1 Separate tralislalioll 5.2 Phases of translation Character sets 5.4 Preprocessing Tokens 5.5 Alternative tokens 56①ok 5.7 Comments 8 Header manes 26 5.9 Preprocessing nluinbers 5.10 Identifiers 5.11 Keywords 5.12 Operators and punctuators 5.13 Literals 6 Basic concepts 39 6.1 Declarations and definitions 6.2 One-definition rule 41 6.3 44 Name lookup 6.5 Program and lin kage 6. 6 Start and termination 6.7 Ste 6.8 Object lifet ime 6.9 Types 10 Lvalues and rvalues 6.11 Alignment Contcnts OISO/IEC 2017- All rights reserved i IsO/IEC14882:2017(E) 7 Standard conversions 86 7.1 Lvalue-to-rvalue conversion 7.2 Array-to-pointer conversion 87 7.3 Function-to-pointer conversion 7.4 Temporary materialization conversion 7.5 Qualification conversions 7.6 Integral p Floating-point promot ior 7. 8 Integra. I 9 Floating-point conversions 7.10 Floating-integra. conversions 7.11P 7.12 Pointer to member conversions 7.13 Function pointer conversions 91 7.14 Boolean conversions 91 7. 15 Integer conversion rank 91 8 Expressions 93 8.1 Primary expressic ons 8.2 Postfix expressions 109 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 8.8 Shift operators 8.9 Relational operators 8.10 Equality operators 8.11 Bitwise AND operator 8.12 Bitwise exclusive OR opcrator 135 8.13 Bitwise inclusive OR operator 8.14 Logical AND 8.15 Logical OR opcrator 4 8.16 Conditional opcrator 136 8.17 Throwing an exception 8. 18 Assignment and compound assignment opcrators 37 8.19 Comma operator 8.20 Constant expressions 139 9 Statements 144 9.1 Labeled stat 9.2E sion stat e 145 9.3 Compound statement or block 145 9.4 Selection statement 145 9.5 Iteration statements 9.6 Jump state 150 9.7 Declaration statement 9.8 Ambiguity resolution ..153 Contcnts OISO/IEC 2017- All rights reserved IsO/IEC14882:2017(E) 10 Declarations 155 10.1 Specifiers 157 10.2 Enumera tion declarations 174 10.3 Namespaces l78 10.4 The asm declarat 191 10.5 Linkage specifications 191 10.6 Attribut e 1 Declarato 201 11. 1 Type noailles 202 11.2 AInbiguity resolutiOn .203 11.3 Mealling of declarators 11.4 Function delirlitions 216 11.5 Structured binding declaratiOns 11.6 Initialize 220 1 2 Classes 237 12. 1 Class namcs 239 12.2 Cla 12.3 Unions 251 12.4 Local class declarations 254 13 Derived classes 255 13.1 ultiple base classes 13.2 Member name lookup 258 13.3 Virtual functions 261 13.4 Abstract classes 265 14 Member access control 267 14.1 Acccss spccificrs 14.2 Accessibility of basc classes and basc class members 4.3 Friend 14.4 Protected member access .,275 14.5 Acccss to virtual functions 14.6 Multiplc acccss 14.7 Ncstcd classes 15 Special member functions 278 15.1 Constructors 278 15.2 Temporary objects 281 15.3 Conversions 15.4 Destructors 286 15.5 Free ste 15.6 Initialization 291 15.7 Construction and destruction 298 15.8 Copying and moving class objects 301 16 Overloading 309 16.1 Overloadable declarations 309 16.2 Declaration matching 311 16.3 Overload rcsolution Contcnts OISO/IEC 2017- All rights reserved IsO/IEC14882:2017(E) 16.4 Address of overloaded function 16.5 Overloaded operators 16.6 Built-in operators 39 17 Templates 342 17.1 Template parameters 17.2N of template specializati 347 17. 3 Template argunents 17.4 Type equivalence 354 17.5 TeMplate declaratiOns 17.6 Nalle resolution 17.7 TeInplate instantiation and specialization 388 17.8 Function template specializatiONs 400 17.9 Deduction guides 421 18 Exception handling 422 18. 1 Throwing an exception 18.2 Constructors and destructors 425 18.3 Handling an exception 18.4 Exception spccifications 18.5 Special functions 430 19 Preprocessing directives 432 19.1 Conditional inclusion 433 19.2 Source file inclusion 435 19.3 Macro replacement 436 19.4 Line control 441 19.5 Error directive 442 19.6 Pragina directive 19. 7 Null directive 19.8 Predefined Nacro maInes 19.9 Pragma operator 20 Library introduction 445 20.1 Gcncral 445 0. 2 The C standard library 20.3 Definit 446 20.4 Method of description(Informative) 20.5 Library-wide rcquircmcnts 454 21 Language support library 476 476 21.2 Common definitions 476 21.3 Implementation properties 481 21.4 Integer types 490 21.5 Start and termination 491 21.6 Dynamic memory management 21.7 Type identification 21.8 Exception handling 502 21.9 Initializer lists 21.10 Other rutine suppurt 507 508 Contcnts OISO/IEC 2017- All rights reserved IsO/IEC14882:2017(E) 22 Diagnostics library 51l 511 22.2F 22.3 Asserti 22.4 Error numbers 22.5 System error support 23 General utilities library 528 528 23.2 Utility conponents 528 23.3 CoIllpile-tiine integer sequences 536 airs 23.5 Tuples 541 23.6 Optional objects 553 23.7 Variants 23.8 Storage for any type 580 23.9 Bitsets 586 23.10Me 592 23 11 Smart pointers 607 23.12 Memory resources 634 3. 13 Class template scoped allocator adaptor 645 23 14 Function objects 23. 15 Metaprogramming and type traits 675 23. 16 Compile-time rational arithmetic 699 23 17 Time utilit 23.18 Class type_index 719 cution policie 24 Strings library 723 24.2 Character traits 72 24.3 String cla 729 24.4 String view classes 762 24.5 Null-terminat ed sequence utilities 772 25 Localization library 778 25.1 General 778 25.2 Header <locale> synopsis 778 25.3 Locales 25.4 Standard locale categories 25.5 C library locales 26 Containers library 826 26.1 General 826 26.2 Container requirements 826 26.3 Sequence containers 26. 4 Associative containers 896 26.5 Unordered a.ssociat ive containers 918 26.6 Cont ainer adaptors Contcnts OISO/IEC 2017- All rights reserved IsO/IEC14882:2017(E) 27 Iterators library 952 27.1 General 952 27.2 Iterator requirements 27.3 Header <iterat 958 27.4 Iterator primitives 961 27.5 Iterator adaptors 964 27.6 Stream itera. tors 27.7 Range acce 27.8 Cont. 28 AlgorithIns liL 986 28.1G 28.2 Header <algorithm 986 8.3 AlgorithlIns requirements 1005 28.4 Parallel algorith 1006 28.5 Non-modifying sequence operations 1009 28.6 Mutating sequence operations 1017 28.7 Sorting alld related 1027 28.8 C library algorithms 1046 29 Numerics library 1047 29.1 General 1047 29.2 Definitions ,1047 1047 29.4 The floating-point environment 29.5 Complex numbers 1049 29.6 Random number generation 1059 Numeric arrays 29.8 Genera. ized numeric opera tion l122 29.9 Mat, hemat ica. I funct ions for floa ting-point types 30 Input/output library 1153 30.1 Gemeral 1153 30.2 lostreains requirenents 1154 30.3 Forward declarations 115 30.4 Standard iostream objects 1156 30.5 Iostreams base classes 1158 30.6 Stream buffers 1175 30.7 ForInal ling and manipulators 11 30.8 String-based streams 1211 30.9 File-based streams 30.10 File systems .1235 30 11 C library files .,1288 31 Regular expressions library 1292 31.1 General 1292 31.2 Definitions 129 31.3 Requirements 1293 31.4 Header <regex> synopsis 31.5 Na.mespace std: regex constants 1301 31.6 Class regex error 1304 Contcnts OISO/IEC 2017- All rights reserved VIll IsO/IEC14882:2017(E) 31.7 Class template regex_traits 1305 31.8 Class template basic_regex.................. 1307 31.9 Class template sub match 31.10 Class template match 1318 31.11 Regular expression algorithms 31 12 Regular expression iterators 1329 31.13 Modified ECMAScript. regular expression grammar 1335 32 Atonic operations library 1338 32.1 General 1338 32.2 Header <atomic> synopsis 1338 32.3 Type aliases 32.4 Order and consistency 1342 32.5L ree properLy 1344 32.6 Class template atomic 1345 32.7 Non-member functions 1352 32.8 Flag type and operations 1352 32.9Fe 1353 33 Thrcad support library 1355 er ,1355 33.2 Requirements 1355 33. 3 Threads 1358 3.4 Mutual exclusion 1363 33.5 Condition variables 1384 33. 6 Futures 1391 a Grammar summary 1408 A1 Keywords 1408 A 2 Lexical conventions .,1408 1413 A 4 Expressions 1413 A.5 Statements 1417 A 6 Declarations 1418 A 7 Declarators 1422 A 8 Classes 1424 A9 Derived classes 1425 A 10 Special member functions 1426 1426 1426 g .,1427 A 14 Prepro cessing directives 1428 B Implement ation quantities 1430 C Compatibility 1432 C1 C++ and ISo c 1432 C2 C++ and Iso(++ 2003 1441 C 3 C++ ald ISo C++ 2011 1447 ISOC++2014 1449 C5 C standard libl Contcnts OISO/IEC 2017- All rights roscrvcd IsO/IEC14882:2017(E) D Compatibility features l456 D 1 Redeclaration of static constexpr data members 1456 D 2 Implicit declaration of copy functions 1456 D3 Deprecated exception specifications ..1456 D 4 C++ standard library headers 1456 D5 C standard library headers 1457 D 6 char* streams 1457 D7 uncaught exception 1466 D8 Old adaptable function bindings 1466 D. 9 The default alloca. tor 1471 1.10 Raw storage iterator 1472 D11 Temporary buffers 1473 D. 12 Deprecat ed type traits D13 Deprecated it erator primitives 1474 1475 D 14 Deprecated shared_ptr observers 1475 D15 Deprecated standard code conversion facets 1475 D 16 Deprecated convenience conversion interfaces 1477 Bibliography 1482 Cross references l483 Cross references from Iso c++ 2014 1504 1506 Index of grammar productions 1539 Index of library names 1543 Index of implcmcntation-dcfincd behavior 1601 Contcnts OISO/IEC 2017- All rights roscrvcd

...展开详情
试读 127P ISO_IEC_14882_2017 Programming languages — C++
立即下载 低至0.43元/次 身份认证VIP会员低至7折
一个资源只可评论一次,评论内容不能少于5个字
您会向同学/朋友/同事推荐我们的CSDN下载吗?
谢谢参与!您的真实评价是我们改进的动力~
关注 私信
上传资源赚钱or赚积分
最新推荐
ISO_IEC_14882_2017 Programming languages — C++ 49积分/C币 立即下载
1/127
ISO_IEC_14882_2017 Programming languages — C++第1页
ISO_IEC_14882_2017 Programming languages — C++第2页
ISO_IEC_14882_2017 Programming languages — C++第3页
ISO_IEC_14882_2017 Programming languages — C++第4页
ISO_IEC_14882_2017 Programming languages — C++第5页
ISO_IEC_14882_2017 Programming languages — C++第6页
ISO_IEC_14882_2017 Programming languages — C++第7页
ISO_IEC_14882_2017 Programming languages — C++第8页
ISO_IEC_14882_2017 Programming languages — C++第9页
ISO_IEC_14882_2017 Programming languages — C++第10页
ISO_IEC_14882_2017 Programming languages — C++第11页
ISO_IEC_14882_2017 Programming languages — C++第12页
ISO_IEC_14882_2017 Programming languages — C++第13页
ISO_IEC_14882_2017 Programming languages — C++第14页
ISO_IEC_14882_2017 Programming languages — C++第15页
ISO_IEC_14882_2017 Programming languages — C++第16页
ISO_IEC_14882_2017 Programming languages — C++第17页
ISO_IEC_14882_2017 Programming languages — C++第18页
ISO_IEC_14882_2017 Programming languages — C++第19页
ISO_IEC_14882_2017 Programming languages — C++第20页

试读结束, 可继续阅读

49积分/C币 立即下载 >