international iso/iec this is a preview of iso/iec 14882 ...iec+14882-2014.pdfthis is a preview of...
TRANSCRIPT
-
Reference numberISO/IEC 14882:2014(E)
© ISO/IEC 2014
INTERNATIONAL STANDARD
ISO/IEC14882
Fourth edition2014-12-15
Information technology — Programming languages — C++
T
echnologies de l'information — Langages de programmation — C++
This is a preview of "ISO/IEC 14882:2014". Click here to purchase the full version from the ANSI store.This is a preview of "ISO/IEC 14882:2014". Click here to purchase the full version from the ANSI store.This is a preview of "ISO/IEC 14882:2014". Click here to purchase the full version from the ANSI store.This is a preview of "ISO/IEC 14882:2014". Click here to purchase the full version from the ANSI store.
http://webstore.ansi.org/RecordDetail.aspx?sku=ISO%2FIEC%2014882:2014&source=previewhttps://webstore.ansi.org/RecordDetail.aspx?sku=ISO%2FIEC%2014882:2014&source=previewhttps://webstore.ansi.org/Standards/ISO/ISOIEC148822014&source=previewhttps://webstore.ansi.org/Standards/ISO/ISOIEC148822014?source=preview
-
ISO/IEC 14882:2014(E)
COPYRIGHT PROTECTED DOCUMENT © ISO/IEC 2014 All 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, or posting on the internet or an intranet, without prior written permission. Permission can be requested from either ISO at the address below or ISO’s member body in the country of the requester.
ISO copyright office Case postale 56 CH-1211 Geneva 20 Tel. + 41 22 749 01 11 Fax + 41 22 749 09 47 E-mail [email protected] Web www.iso.org
Published in Switzerland
ii © ISO/IEC 2014 – All rights reserved
This is a preview of "ISO/IEC 14882:2014". Click here to purchase the full version from the ANSI store.This is a preview of "ISO/IEC 14882:2014". Click here to purchase the full version from the ANSI store.This is a preview of "ISO/IEC 14882:2014". Click here to purchase the full version from the ANSI store.This is a preview of "ISO/IEC 14882:2014". Click here to purchase the full version from the ANSI store.
http://webstore.ansi.org/RecordDetail.aspx?sku=ISO%2FIEC%2014882:2014&source=previewhttps://webstore.ansi.org/RecordDetail.aspx?sku=ISO%2FIEC%2014882:2014&source=previewhttps://webstore.ansi.org/Standards/ISO/ISOIEC148822014&source=previewhttps://webstore.ansi.org/Standards/ISO/ISOIEC148822014?source=preview
-
ISO/IEC 14882:2014(E)
ContentsContents iii
List of Tables xi
List of Figures xv
Foreword xvi
1 General 11.1 Scope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.2 Normative references . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.3 Terms and definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21.4 Implementation compliance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51.5 Structure of this International Standard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51.6 Syntax notation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61.7 The C++ memory model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61.8 The C++ object model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71.9 Program execution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81.10 Multi-threaded executions and data races . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111.11 Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
2 Lexical conventions 162.1 Separate translation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162.2 Phases of translation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162.3 Character sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172.4 Trigraph sequences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182.5 Preprocessing tokens . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192.6 Alternative tokens . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202.7 Tokens . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202.8 Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202.9 Header names . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202.10 Preprocessing numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212.11 Identifiers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212.12 Keywords . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222.13 Operators and punctuators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222.14 Literals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
3 Basic concepts 323.1 Declarations and definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323.2 One definition rule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 343.3 Scope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 373.4 Name lookup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 423.5 Program and linkage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 563.6 Start and termination . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 593.7 Storage duration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 623.8 Object lifetime . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
Contents c© ISO/IEC 2014 – All rights reserved iii
This is a preview of "ISO/IEC 14882:2014". Click here to purchase the full version from the ANSI store.This is a preview of "ISO/IEC 14882:2014". Click here to purchase the full version from the ANSI store.This is a preview of "ISO/IEC 14882:2014". Click here to purchase the full version from the ANSI store.This is a preview of "ISO/IEC 14882:2014". Click here to purchase the full version from the ANSI store.
http://webstore.ansi.org/RecordDetail.aspx?sku=ISO%2FIEC%2014882:2014&source=previewhttps://webstore.ansi.org/RecordDetail.aspx?sku=ISO%2FIEC%2014882:2014&source=previewhttps://webstore.ansi.org/Standards/ISO/ISOIEC148822014&source=previewhttps://webstore.ansi.org/Standards/ISO/ISOIEC148822014?source=preview
-
ISO/IEC 14882:2014(E)
3.9 Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 693.10 Lvalues and rvalues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 753.11 Alignment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
4 Standard conversions 784.1 Lvalue-to-rvalue conversion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 794.2 Array-to-pointer conversion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 794.3 Function-to-pointer conversion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 794.4 Qualification conversions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 804.5 Integral promotions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 814.6 Floating point promotion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 814.7 Integral conversions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 814.8 Floating point conversions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 824.9 Floating-integral conversions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 824.10 Pointer conversions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 824.11 Pointer to member conversions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 824.12 Boolean conversions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 834.13 Integer conversion rank . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
5 Expressions 845.1 Primary expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 875.2 Postfix expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 975.3 Unary expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1085.4 Explicit type conversion (cast notation) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1175.5 Pointer-to-member operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1185.6 Multiplicative operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1185.7 Additive operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1195.8 Shift operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1205.9 Relational operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1205.10 Equality operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1215.11 Bitwise AND operator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1225.12 Bitwise exclusive OR operator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1225.13 Bitwise inclusive OR operator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1225.14 Logical AND operator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1235.15 Logical OR operator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1235.16 Conditional operator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1235.17 Assignment and compound assignment operators . . . . . . . . . . . . . . . . . . . . . . . . 1255.18 Comma operator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1265.19 Constant expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
6 Statements 1306.1 Labeled statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1306.2 Expression statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1306.3 Compound statement or block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1306.4 Selection statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1316.5 Iteration statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1326.6 Jump statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1356.7 Declaration statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1366.8 Ambiguity resolution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
7 Declarations 139
Contents c© ISO/IEC 2014 – All rights reserved iv
This is a preview of "ISO/IEC 14882:2014". Click here to purchase the full version from the ANSI store.This is a preview of "ISO/IEC 14882:2014". Click here to purchase the full version from the ANSI store.This is a preview of "ISO/IEC 14882:2014". Click here to purchase the full version from the ANSI store.This is a preview of "ISO/IEC 14882:2014". Click here to purchase the full version from the ANSI store.
http://webstore.ansi.org/RecordDetail.aspx?sku=ISO%2FIEC%2014882:2014&source=previewhttps://webstore.ansi.org/RecordDetail.aspx?sku=ISO%2FIEC%2014882:2014&source=previewhttps://webstore.ansi.org/Standards/ISO/ISOIEC148822014&source=previewhttps://webstore.ansi.org/Standards/ISO/ISOIEC148822014?source=preview
-
ISO/IEC 14882:2014(E)
7.1 Specifiers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1407.2 Enumeration declarations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1577.3 Namespaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1617.4 The asm declaration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1737.5 Linkage specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1737.6 Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176
8 Declarators 1818.1 Type names . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1828.2 Ambiguity resolution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1838.3 Meaning of declarators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1848.4 Function definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1968.5 Initializers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199
9 Classes 2149.1 Class names . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2169.2 Class members . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2189.3 Member functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2209.4 Static members . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2239.5 Unions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2249.6 Bit-fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2269.7 Nested class declarations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2279.8 Local class declarations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2289.9 Nested type names . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228
10 Derived classes 23010.1 Multiple base classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23110.2 Member name lookup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23310.3 Virtual functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23610.4 Abstract classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 240
11 Member access control 24211.1 Access specifiers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24311.2 Accessibility of base classes and base class members . . . . . . . . . . . . . . . . . . . . . . . 24411.3 Friends . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24711.4 Protected member access . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25011.5 Access to virtual functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25111.6 Multiple access . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25111.7 Nested classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251
12 Special member functions 25312.1 Constructors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25312.2 Temporary objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25512.3 Conversions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25812.4 Destructors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26012.5 Free store . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26312.6 Initialization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26512.7 Construction and destruction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27012.8 Copying and moving class objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27312.9 Inheriting constructors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 280
Contents c© ISO/IEC 2014 – All rights reserved v
This is a preview of "ISO/IEC 14882:2014". Click here to purchase the full version from the ANSI store.This is a preview of "ISO/IEC 14882:2014". Click here to purchase the full version from the ANSI store.This is a preview of "ISO/IEC 14882:2014". Click here to purchase the full version from the ANSI store.This is a preview of "ISO/IEC 14882:2014". Click here to purchase the full version from the ANSI store.
http://webstore.ansi.org/RecordDetail.aspx?sku=ISO%2FIEC%2014882:2014&source=previewhttps://webstore.ansi.org/RecordDetail.aspx?sku=ISO%2FIEC%2014882:2014&source=previewhttps://webstore.ansi.org/Standards/ISO/ISOIEC148822014&source=previewhttps://webstore.ansi.org/Standards/ISO/ISOIEC148822014?source=preview
-
ISO/IEC 14882:2014(E)
13 Overloading 28413.1 Overloadable declarations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28413.2 Declaration matching . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28613.3 Overload resolution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28713.4 Address of overloaded function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30713.5 Overloaded operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30813.6 Built-in operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 312
14 Templates 31614.1 Template parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31714.2 Names of template specializations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32014.3 Template arguments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32214.4 Type equivalence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32814.5 Template declarations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32914.6 Name resolution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34614.7 Template instantiation and specialization . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35914.8 Function template specializations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 371
15 Exception handling 39215.1 Throwing an exception . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39315.2 Constructors and destructors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39515.3 Handling an exception . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39515.4 Exception specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39715.5 Special functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 400
16 Preprocessing directives 40316.1 Conditional inclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40416.2 Source file inclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40516.3 Macro replacement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40616.4 Line control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41116.5 Error directive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41216.6 Pragma directive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41216.7 Null directive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41216.8 Predefined macro names . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41216.9 Pragma operator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 413
17 Library introduction 41417.1 General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41417.2 The C standard library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41517.3 Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41517.4 Additional definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41817.5 Method of description (Informative) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41817.6 Library-wide requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 423
18 Language support library 44318.1 General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44318.2 Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44318.3 Implementation properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44418.4 Integer types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45318.5 Start and termination . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45518.6 Dynamic memory management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 456
Contents c© ISO/IEC 2014 – All rights reserved vi
This is a preview of "ISO/IEC 14882:2014". Click here to purchase the full version from the ANSI store.This is a preview of "ISO/IEC 14882:2014". Click here to purchase the full version from the ANSI store.This is a preview of "ISO/IEC 14882:2014". Click here to purchase the full version from the ANSI store.This is a preview of "ISO/IEC 14882:2014". Click here to purchase the full version from the ANSI store.
http://webstore.ansi.org/RecordDetail.aspx?sku=ISO%2FIEC%2014882:2014&source=previewhttps://webstore.ansi.org/RecordDetail.aspx?sku=ISO%2FIEC%2014882:2014&source=previewhttps://webstore.ansi.org/Standards/ISO/ISOIEC148822014&source=previewhttps://webstore.ansi.org/Standards/ISO/ISOIEC148822014?source=preview
-
ISO/IEC 14882:2014(E)
18.7 Type identification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46318.8 Exception handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46518.9 Initializer lists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47018.10 Other runtime support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 471
19 Diagnostics library 47419.1 General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47419.2 Exception classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47419.3 Assertions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47819.4 Error numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47819.5 System error support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 478
20 General utilities library 49020.1 General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49020.2 Utility components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49020.3 Pairs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49520.4 Tuples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50020.5 Compile-time integer sequences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51020.6 Class template bitset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51120.7 Memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51920.8 Smart pointers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53420.9 Function objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56220.10 Metaprogramming and type traits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58420.11 Compile-time rational arithmetic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60320.12 Time utilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60620.13 Class template scoped_allocator_adaptor . . . . . . . . . . . . . . . . . . . . . . . . . . . 62220.14 Class type_index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 629
21 Strings library 63121.1 General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63121.2 Character traits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63121.3 String classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63721.4 Class template basic_string . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64121.5 Numeric conversions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66921.6 Hash support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67121.7 Suffix for basic_string literals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67121.8 Null-terminated sequence utilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 671
22 Localization library 67522.1 General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67522.2 Header synopsis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67522.3 Locales . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67622.4 Standard locale categories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68922.5 Standard code conversion facets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72922.6 C library locales . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 731
23 Containers library 73223.1 General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73223.2 Container requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73223.3 Sequence containers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76023.4 Associative containers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 791
Contents c© ISO/IEC 2014 – All rights reserved vii
This is a preview of "ISO/IEC 14882:2014". Click here to purchase the full version from the ANSI store.This is a preview of "ISO/IEC 14882:2014". Click here to purchase the full version from the ANSI store.This is a preview of "ISO/IEC 14882:2014". Click here to purchase the full version from the ANSI store.This is a preview of "ISO/IEC 14882:2014". Click here to purchase the full version from the ANSI store.
http://webstore.ansi.org/RecordDetail.aspx?sku=ISO%2FIEC%2014882:2014&source=previewhttps://webstore.ansi.org/RecordDetail.aspx?sku=ISO%2FIEC%2014882:2014&source=previewhttps://webstore.ansi.org/Standards/ISO/ISOIEC148822014&source=previewhttps://webstore.ansi.org/Standards/ISO/ISOIEC148822014?source=preview
-
ISO/IEC 14882:2014(E)
23.5 Unordered associative containers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80823.6 Container adaptors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 825
24 Iterators library 83524.1 General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83524.2 Iterator requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83524.3 Header synopsis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84024.4 Iterator primitives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84324.5 Iterator adaptors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84724.6 Stream iterators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86024.7 range access . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 867
25 Algorithms library 86925.1 General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86925.2 Non-modifying sequence operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88025.3 Mutating sequence operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88525.4 Sorting and related operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89325.5 C library algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 906
26 Numerics library 90826.1 General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90826.2 Numeric type requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90826.3 The floating-point environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90926.4 Complex numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91026.5 Random number generation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92126.6 Numeric arrays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96626.7 Generalized numeric operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98726.8 C library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 990
27 Input/output library 99527.1 General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99527.2 Iostreams requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99527.3 Forward declarations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99627.4 Standard iostream objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99827.5 Iostreams base classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100027.6 Stream buffers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101927.7 Formatting and manipulators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102927.8 String-based streams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105827.9 File-based streams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1069
28 Regular expressions library 108528.1 General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108528.2 Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108528.3 Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108628.4 Header synopsis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108828.5 Namespace std::regex_constants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109528.6 Class regex_error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109828.7 Class template regex_traits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109828.8 Class template basic_regex . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110128.9 Class template sub_match . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110828.10 Class template match_results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1114
Contents c© ISO/IEC 2014 – All rights reserved viii
This is a preview of "ISO/IEC 14882:2014". Click here to purchase the full version from the ANSI store.This is a preview of "ISO/IEC 14882:2014". Click here to purchase the full version from the ANSI store.This is a preview of "ISO/IEC 14882:2014". Click here to purchase the full version from the ANSI store.This is a preview of "ISO/IEC 14882:2014". Click here to purchase the full version from the ANSI store.
http://webstore.ansi.org/RecordDetail.aspx?sku=ISO%2FIEC%2014882:2014&source=previewhttps://webstore.ansi.org/RecordDetail.aspx?sku=ISO%2FIEC%2014882:2014&source=previewhttps://webstore.ansi.org/Standards/ISO/ISOIEC148822014&source=previewhttps://webstore.ansi.org/Standards/ISO/ISOIEC148822014?source=preview
-
ISO/IEC 14882:2014(E)
28.11 Regular expression algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112028.12 Regular expression iterators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112528.13 Modified ECMAScript regular expression grammar . . . . . . . . . . . . . . . . . . . . . . . 1131
29 Atomic operations library 113429.1 General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113429.2 Header synopsis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113429.3 Order and consistency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113729.4 Lock-free property . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113929.5 Atomic types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113929.6 Operations on atomic types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114329.7 Flag type and operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114929.8 Fences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1150
30 Thread support library 115130.1 General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115130.2 Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115130.3 Threads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115430.4 Mutual exclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115930.5 Condition variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117930.6 Futures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1187
A Grammar summary 1205A.1 Keywords . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1205A.2 Lexical conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1205A.3 Basic concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1209A.4 Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1210A.5 Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1213A.6 Declarations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1214A.7 Declarators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1218A.8 Classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1220A.9 Derived classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1220A.10 Special member functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1221A.11 Overloading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1221A.12 Templates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1222A.13 Exception handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1222A.14 Preprocessing directives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1223
B Implementation quantities 1225
C Compatibility 1227C.1 C++ and ISO C . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1227C.2 C++ and ISO C++ 2003 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1235C.3 C++ and ISO C++ 2011 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1242C.4 C standard library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1243
D Compatibility features 1247D.1 Increment operator with bool operand . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1247D.2 register keyword . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1247D.3 Implicit declaration of copy functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1247D.4 Dynamic exception specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1247
Contents c© ISO/IEC 2014 – All rights reserved ix
This is a preview of "ISO/IEC 14882:2014". Click here to purchase the full version from the ANSI store.This is a preview of "ISO/IEC 14882:2014". Click here to purchase the full version from the ANSI store.This is a preview of "ISO/IEC 14882:2014". Click here to purchase the full version from the ANSI store.This is a preview of "ISO/IEC 14882:2014". Click here to purchase the full version from the ANSI store.
http://webstore.ansi.org/RecordDetail.aspx?sku=ISO%2FIEC%2014882:2014&source=previewhttps://webstore.ansi.org/RecordDetail.aspx?sku=ISO%2FIEC%2014882:2014&source=previewhttps://webstore.ansi.org/Standards/ISO/ISOIEC148822014&source=previewhttps://webstore.ansi.org/Standards/ISO/ISOIEC148822014?source=preview
-
ISO/IEC 14882:2014(E)
D.5 C standard library headers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1247D.6 Old iostreams members . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1248D.7 char* streams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1249D.8 Function objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1258D.9 Binders . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1262D.10 auto_ptr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1263D.11 Violating exception-specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1266D.12 Random shuffle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1266
E Universal character names for identifier characters 1268E.1 Ranges of characters allowed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1268E.2 Ranges of characters disallowed initially . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1268
F Cross references 1269
Index 1287
Index of grammar productions 1316
Index of library names 1319
Index of implementation-defined behavior 1356
Contents c© ISO/IEC 2014 – All rights reserved x
This is a preview of "ISO/IEC 14882:2014". Click here to purchase the full version from the ANSI store.This is a preview of "ISO/IEC 14882:2014". Click here to purchase the full version from the ANSI store.This is a preview of "ISO/IEC 14882:2014". Click here to purchase the full version from the ANSI store.This is a preview of "ISO/IEC 14882:2014". Click here to purchase the full version from the ANSI store.
http://webstore.ansi.org/RecordDetail.aspx?sku=ISO%2FIEC%2014882:2014&source=previewhttps://webstore.ansi.org/RecordDetail.aspx?sku=ISO%2FIEC%2014882:2014&source=previewhttps://webstore.ansi.org/Standards/ISO/ISOIEC148822014&source=previewhttps://webstore.ansi.org/Standards/ISO/ISOIEC148822014?source=preview
-
ISO/IEC 14882:2014(E)
List of Tables1 Trigraph sequences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182 Alternative tokens . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203 Identifiers with special meaning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 224 Keywords . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225 Alternative representations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226 Types of integer literals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247 Escape sequences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 268 String literal concatenations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
9 Relations on const and volatile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
10 simple-type-specifiers and the types they specify . . . . . . . . . . . . . . . . . . . . . . . . . . . 151
11 Relationship between operator and function call notation . . . . . . . . . . . . . . . . . . . . . . 29212 Conversions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 300
13 Library categories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41414 C++ library headers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42415 C++ headers for C library facilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42416 C++ headers for freestanding implementations . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42517 EqualityComparable requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42618 LessThanComparable requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42619 DefaultConstructible requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42720 MoveConstructible requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42721 CopyConstructible requirements (in addition to MoveConstructible) . . . . . . . . . . . . . . 42722 MoveAssignable requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42723 CopyAssignable requirements (in addition to MoveAssignable) . . . . . . . . . . . . . . . . . . 42724 Destructible requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42725 NullablePointer requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42926 Hash requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43027 Descriptive variable definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43028 Allocator requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 431
29 Language support library summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44330 Header synopsis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44331 Header synopsis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45332 Header synopsis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45333 Header synopsis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45534 Header synopsis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47235 Header synopsis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47236 Header synopsis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47237 Header synopsis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47238 Header synopsis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47339 Header synopsis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47340 Header synopsis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 473
List of Tables c© ISO/IEC 2014 – All rights reserved xi
This is a preview of "ISO/IEC 14882:2014". Click here to purchase the full version from the ANSI store.This is a preview of "ISO/IEC 14882:2014". Click here to purchase the full version from the ANSI store.This is a preview of "ISO/IEC 14882:2014". Click here to purchase the full version from the ANSI store.This is a preview of "ISO/IEC 14882:2014". Click here to purchase the full version from the ANSI store.
http://webstore.ansi.org/RecordDetail.aspx?sku=ISO%2FIEC%2014882:2014&source=previewhttps://webstore.ansi.org/RecordDetail.aspx?sku=ISO%2FIEC%2014882:2014&source=previewhttps://webstore.ansi.org/Standards/ISO/ISOIEC148822014&source=previewhttps://webstore.ansi.org/Standards/ISO/ISOIEC148822014?source=preview
-
ISO/IEC 14882:2014(E)
41 Diagnostics library summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47442 Header synopsis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47843 Header synopsis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 479
44 General utilities library summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49045 Header synopsis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53346 Header synopsis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53447 Primary type category predicates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58848 Composite type category predicates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58949 Type property predicates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59050 Type property queries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59651 Type relationship predicates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59752 Const-volatile modifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59853 Reference modifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59854 Sign modifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59955 Array modifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60056 Pointer modifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60057 Other transformations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60158 Expressions used to perform ratio arithmetic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60559 Clock requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60960 Header synopsis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 622
61 Strings library summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63162 Character traits requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63263 basic_string(const Allocator&) effects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64564 basic_string(const basic_string&) effects . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64665 basic_string(const basic_string&, size_type, size_type, const Allocator&) effects . 64666 basic_string(const charT*, size_type, const Allocator&) effects . . . . . . . . . . . . . . 64767 basic_string(const charT*, const Allocator&) effects . . . . . . . . . . . . . . . . . . . . . 64768 basic_string(size_t, charT, const Allocator&) effects . . . . . . . . . . . . . . . . . . . . 64769 basic_string(const basic_string&, const Allocator&) and basic_string(basic_string&&,
const Allocator&) effects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64870 operator=(const basic_string&) effects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64871 operator=(basic_string&&) effects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64972 compare() results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66373 Potential mbstate_t data races . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67374 Header synopsis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67375 Header synopsis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67376 Header synopsis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67377 Header synopsis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67478 Header synopsis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67479 Header synopsis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 674
80 Localization library summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67581 Locale category facets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67982 Required specializations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67983 do_in/do_out result values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69984 do_unshift result values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69985 Integer conversions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70386 Length modifier . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70387 Integer conversions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 707
List of Tables c© ISO/IEC 2014 – All rights reserved xii
This is a preview of "ISO/IEC 14882:2014". Click here to purchase the full version from the ANSI store.This is a preview of "ISO/IEC 14882:2014". Click here to purchase the full version from the ANSI store.This is a preview of "ISO/IEC 14882:2014". Click here to purchase the full version from the ANSI store.This is a preview of "ISO/IEC 14882:2014". Click here to purchase the full version from the ANSI store.
http://webstore.ansi.org/RecordDetail.aspx?sku=ISO%2FIEC%2014882:2014&source=previewhttps://webstore.ansi.org/RecordDetail.aspx?sku=ISO%2FIEC%2014882:2014&source=previewhttps://webstore.ansi.org/Standards/ISO/ISOIEC148822014&source=previewhttps://webstore.ansi.org/Standards/ISO/ISOIEC148822014?source=preview
-
ISO/IEC 14882:2014(E)
88 Floating-point conversions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70789 Length modifier . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70890 Numeric conversions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70891 Fill padding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70992 do_get_date effects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71693 Header synopsis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73194 Potential setlocale data races . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 731
95 Containers library summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73296 Container requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73397 Reversible container requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73598 Optional container operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73699 Allocator-aware container requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 738100 Sequence container requirements (in addition to container) . . . . . . . . . . . . . . . . . . . . . 740101 Optional sequence container operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 742102 Associative container requirements (in addition to container) . . . . . . . . . . . . . . . . . . . . 744103 Unordered associative container requirements (in addition to container) . . . . . . . . . . . . . . 752
104 Iterators library summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 835105 Relations among iterator categories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 835106 Iterator requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 836107 Input iterator requirements (in addition to Iterator) . . . . . . . . . . . . . . . . . . . . . . . . . 837108 Output iterator requirements (in addition to Iterator) . . . . . . . . . . . . . . . . . . . . . . . . 838109 Forward iterator requirements (in addition to input iterator) . . . . . . . . . . . . . . . . . . . . 839110 Bidirectional iterator requirements (in addition to forward iterator) . . . . . . . . . . . . . . . . . 839111 Random access iterator requirements (in addition to bidirectional iterator) . . . . . . . . . . . . 840
112 Algorithms library summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 869113 Header synopsis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 906
114 Numerics library summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 908115 Seed sequence requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 923116 Uniform random number generator requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . 924117 Random number engine requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 925118 Random number distribution requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 928119 Header synopsis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 991120 Header synopsis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 991
121 Input/output library summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 995122 fmtflags effects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1005123 fmtflags constants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1005124 iostate effects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1005125 openmode effects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1005126 seekdir effects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1006127 Position type requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1010128 basic_ios::init() effects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1012129 basic_ios::copyfmt() effects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1014130 seekoff positioning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1062131 newoff values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1063132 File open modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1073133 seekoff effects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1075
List of Tables c© ISO/IEC 2014 – All rights reserved xiii
This is a preview of "ISO/IEC 14882:2014". Click here to purchase the full version from the ANSI store.This is a preview of "ISO/IEC 14882:2014". Click here to purchase the full version from the ANSI store.This is a preview of "ISO/IEC 14882:2014". Click here to purchase the full version from the ANSI store.This is a preview of "ISO/IEC 14882:2014". Click here to purchase the full version from the ANSI store.
http://webstore.ansi.org/RecordDetail.aspx?sku=ISO%2FIEC%2014882:2014&source=previewhttps://webstore.ansi.org/RecordDetail.aspx?sku=ISO%2FIEC%2014882:2014&source=previewhttps://webstore.ansi.org/Standards/ISO/ISOIEC148822014&source=previewhttps://webstore.ansi.org/Standards/ISO/ISOIEC148822014?source=preview
-
ISO/IEC 14882:2014(E)
134 Header synopsis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1083135 Header synopsis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1084
136 Regular expressions library summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1085137 Regular expression traits class requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1086138 syntax_option_type effects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1096139 regex_constants::match_flag_type effects when obtaining a match against a character con-
tainer sequence [first,last). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1096140 error_type values in the C locale . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1097141 Character class names and corresponding ctype masks . . . . . . . . . . . . . . . . . . . . . . . . 1102142 match_results assignment operator effects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1117143 Effects of regex_match algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1120144 Effects of regex_search algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1122
145 Atomics library summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1134146 atomic integral typedefs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1143147 atomic typedefs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1144148 Atomic arithmetic computations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1148
149 Thread support library summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1151
150 Standard macros . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1243151 Standard values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1243152 Standard types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1244153 Standard structs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1244154 Standard functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1245
155 C headers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1247156 strstreambuf(streamsize) effects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1251157 strstreambuf(void* (*)(size_t), void (*)(void*)) effects . . . . . . . . . . . . . . . . . . 1251158 strstreambuf(charT*, streamsize, charT*) effects . . . . . . . . . . . . . . . . . . . . . . . . 1251159 seekoff positioning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1254160 newoff values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1254
List of Tables c© ISO/IEC 2014 – All rights reserved xiv
This is a preview of "ISO/IEC 14882:2014". Click here to purchase the full version from the ANSI store.This is a preview of "ISO/IEC 14882:2014". Click here to purchase the full version from the ANSI store.This is a preview of "ISO/IEC 14882:2014". Click here to purchase the full version from the ANSI store.This is a preview of "ISO/IEC 14882:2014". Click here to purchase the full version from the ANSI store.
http://webstore.ansi.org/RecordDetail.aspx?sku=ISO%2FIEC%2014882:2014&source=previewhttps://webstore.ansi.org/RecordDetail.aspx?sku=ISO%2FIEC%2014882:2014&source=previewhttps://webstore.ansi.org/Standards/ISO/ISOIEC148822014&source=previewhttps://webstore.ansi.org/Standards/ISO/ISOIEC148822014?source=preview
-
ISO/IEC 14882:2014(E)
List of Figures1 Expression category taxonomy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
2 Directed acyclic graph . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2313 Non-virtual base . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2324 Virtual base . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2335 Virtual and non-virtual base . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2336 Name lookup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235
7 Stream position, offset, and size types [non-normative] . . . . . . . . . . . . . . . . . . . . . . . . 995
List of Figures c© ISO/IEC 2014 – All rights reserved xv
This is a preview of "ISO/IEC 14882:2014". Click here to purchase the full version from the ANSI store.This is a preview of "ISO/IEC 14882:2014". Click here to purchase the full version from the ANSI store.This is a preview of "ISO/IEC 14882:2014". Click here to purchase the full version from the ANSI store.This is a preview of "ISO/IEC 14882:2014". Click here to purchase the full version from the ANSI store.
http://webstore.ansi.org/RecordDetail.aspx?sku=ISO%2FIEC%2014882:2014&source=previewhttps://webstore.ansi.org/RecordDetail.aspx?sku=ISO%2FIEC%2014882:2014&source=previewhttps://webstore.ansi.org/Standards/ISO/ISOIEC148822014&source=previewhttps://webstore.ansi.org/Standards/ISO/ISOIEC148822014?source=preview
-
ISO/IEC 14882:2014(E)
ForewordISO (the International Organization for Standardization) and IEC (the International Electrotechnical Com-mission) form the specialized system for worldwide standardization. National bodies that are members ofISO or IEC participate in the development of International Standards through technical committees es-tablished by the respective organization to deal with particular fields of technical activity. ISO and IECtechnical committees collaborate in fields of mutual interest. Other international organizations, governmen-tal and non-governmental, in liaison with ISO and IEC, also take part in the work. In the field of informationtechnology, ISO and IEC have established a joint technical committee, ISO/IEC JTC 1.
The procedures used to develop this document and those intended for its further maintenance are describedin the ISO/IEC Directives, Part 1. In particular the different approval criteria needed for the different typesof document should be noted. This document was drafted in accordance with the editorial rules of theISO/IEC Directives, Part 2 (see www.iso.org/directives).
Attention is drawn to the possibility that some of the elements of this document may be the subject ofpatent rights. ISO and IEC shall not be held responsible for identifying any or all such patent rights. De-tails of any patent rights identified during the development of the document will be in the Introductionand/or on the ISO list of patent declarations received (see www.iso.org/patents).
Any trade name used in this document is information given for the convenience of users and does notconstitute an endorsement.
For an explanation on the meaning of ISO specific terms and expressions related to conformity assess-ment, as well as information about ISO’s adherence to the WTO principles in the Technical Barriers toTrade (TBT) see the following URL: Foreword - Supplementary information
The committee responsible for this document is ISO/IEC JTC 1, Information technology, SC 22, Pro-gramming languages, their environments and system software interfaces
This fourth edition cancels and replaces the third edition (ISO/IEC 14882:2011), of which it constitutesa minor revision.
Foreword c© ISO/IEC 2014 – All rights reserved xvi
This is a preview of "ISO/IEC 14882:2014". Click here to purchase the full version from the ANSI store.This is a preview of "ISO/IEC 14882:2014". Click here to purchase the full version from the ANSI store.This is a preview of "ISO/IEC 14882:2014". Click here to purchase the full version from the ANSI store.This is a preview of "ISO/IEC 14882:2014". Click here to purchase the full version from the ANSI store.
http://www.iso.org/directiveshttp://www.iso.org/patentshttp://www.iso.org/iso/home/standards_development/resources-for-technical-work/foreword.htmhttp://webstore.ansi.org/RecordDetail.aspx?sku=ISO%2FIEC%2014882:2014&source=previewhttps://webstore.ansi.org/RecordDetail.aspx?sku=ISO%2FIEC%2014882:2014&source=previewhttps://webstore.ansi.org/Standards/ISO/ISOIEC148822014&source=previewhttps://webstore.ansi.org/Standards/ISO/ISOIEC148822014?source=preview