Стандарт C++ 11
Описание файла
PDF-файл из архива "Стандарт C++ 11", который расположен в категории "". Всё это находится в предмете "практикум (прикладное программное обеспечение и системы программирования)" из 4 семестр, которые можно найти в файловом архиве МГУ им. Ломоносова. Не смотря на прямую связь этого архива с МГУ им. Ломоносова, его также можно найти и в других разделах. .
Просмотр PDF-файла онлайн
Текст из PDF
INTERNATIONALSTANDARDISO/IEC14882Third edition2011-09-01Information technology — Programminglanguages — C++Technologies de l'information — Langages de programmation — C++Reference numberISO/IEC 14882:2011(E)© ISO/IEC 2011ISO/IEC 14882:2011(E)COPYRIGHT PROTECTED DOCUMENT© ISO/IEC 2011All rights reserved. Unless otherwise specified, no part of this publication may be reproduced or utilized in any form or by any means,electronic or mechanical, including photocopying and microfilm, without permission in writing from either ISO at the address below orISO's member body in the country of the requester.ISO copyright officeCase postale 56 CH-1211 Geneva 20Tel.
+ 41 22 749 01 11Fax + 41 22 749 09 47E-mail copyright@iso.orgWeb www.iso.orgPublished in Switzerlandii© ISO/IEC 2011 – All rights reservedISO/IEC 14882:2011(E)ContentsContentsiiiList of TablesxiList of Figuresxv1 General1.1Scope . . . . . . .
. . . . . . . . . . . . .1.2Normative references . . . . . . . . . . . .1.3Terms and definitions . . . . . . . . . . . .1.4Implementation compliance . . . . . . . .1.5Structure of this International Standard .1.6Syntax notation . . . . . . . . . . . . . . .1.7The C++ memory model . . . . . . . . . .1.8The C++ object model . . . . . . . . . . .1.9Program execution . . . .
. . . . . . . . .1.10 Multi-threaded executions and data races1.11 Acknowledgments . . . . . . . . . . . . . .....................................................................................................................................................................................................................................................................................................................111256677812162 Lexical conventions2.1Separate translation . . .
.2.2Phases of translation . . . .2.3Character sets . . . . . . . .2.4Trigraph sequences . . . . .2.5Preprocessing tokens . . . .2.6Alternative tokens . . . . .2.7Tokens . . . . . . . . . . . .2.8Comments . . . . . . . . . .2.9Header names . . . . . . . .2.10 Preprocessing numbers . . .2.11 Identifiers . . . .
. . . . . .2.12 Keywords . . . . . . . . . .2.13 Operators and punctuators2.14 Literals . . . . . . . . . . .........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................1717171819202121212222222324243 Basic3.13.23.33.43.53.63.73.83.93.10........................................................................................................................................................................................................................................................................................................................................................................3434363845596265697278conceptsDeclarations and definitionsOne definition rule .
. . . .Scope . . . . . . . . . . . .Name lookup . . . . . . . .Program and linkage . . . .Start and termination . . .Storage duration . . . . . .Object lifetime . . . . . . .Types . . . . . . . . . . . .Lvalues and rvalues . . . . .Contents© ISO/IEC 2011 – All rights reservediiiISO/IEC 14882:2011(E)3.11Alignment . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4 Standard conversions4.1Lvalue-to-rvalue conversion . .4.2Array-to-pointer conversion . .4.3Function-to-pointer conversion .4.4Qualification conversions . . . .4.5Integral promotions . . . . . .
.4.6Floating point promotion . . .4.7Integral conversions . . . . . . .4.8Floating point conversions . . .4.9Floating-integral conversions . .4.10 Pointer conversions . . . . . . .4.11 Pointer to member conversions4.12 Boolean conversions . . . . . .4.13 Integer conversion rank . . . .
.80.....................................................................................................................................................................................................................................................................................................................................81828282828384848485858586865 Expressions5.1Primary expressions .
. . . . . . . . . . . . . . .5.2Postfix expressions . . . . . . . . . . . . . . . . .5.3Unary expressions . . . . . . . . . . . . . . . . . .5.4Explicit type conversion (cast notation) . . . . .5.5Pointer-to-member operators . . . . . . . . . . .5.6Multiplicative operators .
. . . . . . . . . . . . .5.7Additive operators . . . . . . . . . . . . . . . . .5.8Shift operators . . . . . . . . . . . . . . . . . . .5.9Relational operators . . . . . . . . . . . . . . . .5.10 Equality operators . . . . . . . . . . . . . . . . .5.11 Bitwise AND operator . . . . . .
. . . . . . . . .5.12 Bitwise exclusive OR operator . . . . . . . . . . .5.13 Bitwise inclusive OR operator . . . . . . . . . . .5.14 Logical AND operator . . . . . . . . . . . . . . .5.15 Logical OR operator . . . . . . . . . . . . . . . .5.16 Conditional operator . . . . .
. . . . . . . . . . .5.17 Assignment and compound assignment operators5.18 Comma operator . . . . . . . . . . . . . . . . . .5.19 Constant expressions . . . . . . . . . . . . . . . .........................................................................................................................................................................................................................................................................................................................................................................................................................................................................8789971091171181191191211211221231231231231241241251271276 Statements6.1Labeled statement .
. . . . .6.2Expression statement . . . . .6.3Compound statement or block6.4Selection statements . . . . .6.5Iteration statements . . . . .6.6Jump statements . . . . . . .6.7Declaration statement . . . .6.8Ambiguity resolution . . . . .................................................................................................................................................................................................130130130130131133136137138.............................................................................................................................................................................................................7 Declarations1407.1Specifiers . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1427.2Enumeration declarations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157Contentsiv© ISO/IEC 2011 – All rights reservedISO/IEC 14882:2011(E)7.37.47.57.6Namespaces . . . . . .The asm declaration .Linkage specificationsAttributes . . .
. . . .............................................................................................................................................................1611731741778 Declarators8.1Type names . . . . . .8.2Ambiguity resolution .8.3Meaning of declarators8.4Function definitions . .8.5Initializers .
. . . . . ....................................................................................................................................................................................................1821831841861982029 Classes9.1Class names . . . . . . .9.2Class members . . . .
.9.3Member functions . . . .9.4Static members . . . . .9.5Unions . . . . . . . . . .9.6Bit-fields . . . . . . . . .9.7Nested class declarations9.8Local class declarations9.9Nested type names . . .......................................................................................................................................................................................................................................................................................................................................................21621822022222522722922923123110 Derived classes10.1 Multiple base classes .10.2 Member name lookup10.3 Virtual functions . .
.10.4 Abstract classes . . . .........................................................................................................................................................233234236240244. . . . . . . . . . . .base class members .. . . . . . . . . . . .. . . . . . . . . . .
.. . . . . . . . . . . .. . . . . . . . . . . .. . . . . . . . . . . ...........................................................................................................................................................246248249251254255256256......................................................................................................................................................................................................257257260262265267269275278286....11 Member access control11.1 Access specifiers . .
. . . . . . .11.2 Accessibility of base classes and11.3 Friends . . . . . . . . . . . . . .11.4 Protected member access . . . .11.5 Access to virtual functions . . .11.6 Multiple access . . . . . . . . .11.7 Nested classes . . . . . . . . . .12 Special member functions12.1 Constructors . . .
. . . . . . . .12.2 Temporary objects . . . . . . . .12.3 Conversions . . . . . . . . . . . .12.4 Destructors . . . . . . . . . . . .12.5 Free store . . . . . . . . . . . . .12.6 Initialization . . . . . . . . . . . .12.7 Construction and destruction . .12.8 Copying and moving class objects12.9 Inheriting constructors . . . . . ....................................................................................................13 Overloading28913.1 Overloadable declarations . .