100% found this document useful (1 vote)
78 views

Download Complete ISO IEC 14882 2020 Information technology Programming languages C 6th Edition Iso PDF for All Chapters

The document provides links to various ebooks available for immediate download on ebookmeta.com, including standards for programming languages, information security, and other topics. It highlights specific titles such as ISO/IEC 14882:2020 for C++ programming and ISO/IEC 27001:2022 for information security management. Additionally, it offers a selection of other digital products across various subjects.

Uploaded by

velintoricsc
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
78 views

Download Complete ISO IEC 14882 2020 Information technology Programming languages C 6th Edition Iso PDF for All Chapters

The document provides links to various ebooks available for immediate download on ebookmeta.com, including standards for programming languages, information security, and other topics. It highlights specific titles such as ISO/IEC 14882:2020 for C++ programming and ISO/IEC 27001:2022 for information security management. Additionally, it offers a selection of other digital products across various subjects.

Uploaded by

velintoricsc
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 38

Get the full ebook with Bonus Features for a Better Reading Experience on ebookmeta.

com

ISO IEC 14882 2020 Information technology


Programming languages C 6th Edition Iso

https://ebookmeta.com/product/iso-
iec-14882-2020-information-technology-programming-
languages-c-6th-edition-iso/

OR CLICK HERE

DOWLOAD NOW

Download more ebook instantly today at https://ebookmeta.com


Recommended digital products (PDF, EPUB, MOBI) that
you can download immediately if you are interested.

INTERNATIONAL STANDARD ISO IEC 9075 1 2016 E Information


technology Database languages SQL Part 1 Framework SQL
Framework Fifth Edition 2016-12-15 Iso/Iec
https://ebookmeta.com/product/international-standard-iso-
iec-9075-1-2016-e-information-technology-database-languages-sql-
part-1-framework-sql-framework-fifth-edition-2016-12-15-iso-iec/
ebookmeta.com

ISO/IEC 27001:2022: Information security, cybersecurity


and privacy protection — Information security management
systems — Requirements 3rd Edition Iso
https://ebookmeta.com/product/iso-iec-270012022-information-security-
cybersecurity-and-privacy-protection-information-security-management-
systems-requirements-3rd-edition-iso/
ebookmeta.com

ISO/IEC 27005:2022■ Information security, cybersecurity


and privacy protection — Guidance on managing information
security risks 4th Edition Iso
https://ebookmeta.com/product/iso-iec-270052022-information-security-
cybersecurity-and-privacy-protection-guidance-on-managing-information-
security-risks-4th-edition-iso/
ebookmeta.com

Urinary Biomarkers 1st Edition Samanta Salvi Valentina


Casadio

https://ebookmeta.com/product/urinary-biomarkers-1st-edition-samanta-
salvi-valentina-casadio/

ebookmeta.com
Dictionary of Daily Life in Biblical Post Biblical
Antiquity Literacy Edwin M Yamauchi Marvin R Wilson

https://ebookmeta.com/product/dictionary-of-daily-life-in-biblical-
post-biblical-antiquity-literacy-edwin-m-yamauchi-marvin-r-wilson/

ebookmeta.com

The Little Penguin Margo Gates

https://ebookmeta.com/product/the-little-penguin-margo-gates/

ebookmeta.com

Engaged Fatherhood for Men Families and Gender Equality


Healthcare Social Policy and Work Perspectives 1st Edition
Marc Grau Grau
https://ebookmeta.com/product/engaged-fatherhood-for-men-families-and-
gender-equality-healthcare-social-policy-and-work-perspectives-1st-
edition-marc-grau-grau/
ebookmeta.com

Everyday English 556 collocations with pictures Learn


English vocabulary and expressions to speak about social
situations 1st Edition Julia Deniskina
https://ebookmeta.com/product/everyday-english-556-collocations-with-
pictures-learn-english-vocabulary-and-expressions-to-speak-about-
social-situations-1st-edition-julia-deniskina/
ebookmeta.com

Chemical reaction engineering : parameter estimation,


exercises and examples Second Edition Martin Schmal

https://ebookmeta.com/product/chemical-reaction-engineering-parameter-
estimation-exercises-and-examples-second-edition-martin-schmal/

ebookmeta.com
The Evolutionary Biology of Extinct and Extant Organisms
1st Edition Kundu

https://ebookmeta.com/product/the-evolutionary-biology-of-extinct-and-
extant-organisms-1st-edition-kundu/

ebookmeta.com
INTERNATIONAL ISO/IEC
STANDARD 14882

Sixth edition
2020-12

Programming languages — C++


Langages de programmation — C++

Reference number
ISO/IEC 14882:2020(E)

© ISO/IEC 2020


COPYRIGHT PROTECTED DOCUMENT


© ISO/IEC 2020
All rights reserved. Unless otherwise specified, or required in the context of its implementation, 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
CP 401 • Ch. de Blandonnet 8
CH-1214 Vernier, Geneva
Phone: +41 22 749 01 11
Email: [email protected]
Website: www.iso.org
Published in Switzerland

ii © ISO/IEC 2020 – All rights reserved


ISO/IEC 14882:2020(E)

Contents
Foreword x

1 Scope 1

2 Normative references 2

3 Terms and definitions 3

4 General principles 9
4.1 Implementation compliance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
4.2 Structure of this document . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
4.3 Syntax notation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

5 Lexical conventions 12
5.1 Separate translation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
5.2 Phases of translation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
5.3 Character sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
5.4 Preprocessing tokens . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
5.5 Alternative tokens . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
5.6 Tokens . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
5.7 Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
5.8 Header names . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
5.9 Preprocessing numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
5.10 Identifiers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
5.11 Keywords . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
5.12 Operators and punctuators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
5.13 Literals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

6 Basics 28
6.1 Preamble . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
6.2 Declarations and definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
6.3 One-definition rule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
6.4 Scope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
6.5 Name lookup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
6.6 Program and linkage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
6.7 Memory and objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
6.8 Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
6.9 Program execution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78

7 Expressions 90
7.1 Preamble . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
7.2 Properties of expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
7.3 Standard conversions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
7.4 Usual arithmetic conversions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
7.5 Primary expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
7.6 Compound expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
7.7 Constant expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147

8 Statements 153
8.1 Preamble . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153
8.2 Labeled statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154
8.3 Expression statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154
8.4 Compound statement or block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154
8.5 Selection statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154

Contents © ISO/IEC 2020 – All rights reserved iii


ISO/IEC 14882:2020(E)

8.6 Iteration statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156


8.7 Jump statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
8.8 Declaration statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
8.9 Ambiguity resolution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161

9 Declarations 163
9.1 Preamble . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163
9.2 Specifiers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165
9.3 Declarators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182
9.4 Initializers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197
9.5 Function definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213
9.6 Structured binding declarations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219
9.7 Enumerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220
9.8 Namespaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 224
9.9 The using declaration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231
9.10 The asm declaration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236
9.11 Linkage specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237
9.12 Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239

10 Modules 247
10.1 Module units and purviews . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247
10.2 Export declaration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248
10.3 Import declaration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251
10.4 Global module fragment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252
10.5 Private module fragment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 254
10.6 Instantiation context . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255
10.7 Reachability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 256

11 Classes 258
11.1 Preamble . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 258
11.2 Properties of classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259
11.3 Class names . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 260
11.4 Class members . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 262
11.5 Unions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 284
11.6 Local class declarations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 287
11.7 Derived classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 287
11.8 Member name lookup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 295
11.9 Member access control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 298
11.10 Initialization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 308
11.11 Comparisons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 319
11.12 Free store . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 322

12 Overloading 324
12.1 Preamble . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 324
12.2 Overloadable declarations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 324
12.3 Declaration matching . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326
12.4 Overload resolution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 327
12.5 Address of overloaded function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 351
12.6 Overloaded operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 352
12.7 Built-in operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 356
12.8 User-defined literals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 358

13 Templates 360
13.1 Preamble . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 360
13.2 Template parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 361
13.3 Names of template specializations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 365
13.4 Template arguments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 368
13.5 Template constraints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 373
13.6 Type equivalence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 379

Contents © ISO/IEC 2020 – All rights reserved iv


ISO/IEC 14882:2020(E)

13.7 Template declarations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 380


13.8 Name resolution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 401
13.9 Template instantiation and specialization . . . . . . . . . . . . . . . . . . . . . . . . . . . 417
13.10 Function template specializations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 431

14 Exception handling 451


14.1 Preamble . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 451
14.2 Throwing an exception . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 452
14.3 Constructors and destructors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 453
14.4 Handling an exception . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 454
14.5 Exception specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 456
14.6 Special functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 458

15 Preprocessing directives 460


15.1 Preamble . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 460
15.2 Conditional inclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 462
15.3 Source file inclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 464
15.4 Module directive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 465
15.5 Header unit importation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 466
15.6 Macro replacement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 467
15.7 Line control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 472
15.8 Error directive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 473
15.9 Pragma directive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 473
15.10 Null directive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 473
15.11 Predefined macro names . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 473
15.12 Pragma operator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 475

16 Library introduction 477


16.1 General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 477
16.2 The C standard library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 478
16.3 Method of description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 478
16.4 Library-wide requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 484

17 Language support library 505


17.1 General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 505
17.2 Common definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 505
17.3 Implementation properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 509
17.4 Integer types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 519
17.5 Startup and termination . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 520
17.6 Dynamic memory management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 522
17.7 Type identification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 529
17.8 Source location . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 530
17.9 Exception handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 532
17.10 Initializer lists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 536
17.11 Comparisons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 537
17.12 Coroutines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 545
17.13 Other runtime support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 549

18 Concepts library 552


18.1 General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 552
18.2 Equality preservation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 552
18.3 Header <concepts> synopsis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 553
18.4 Language-related concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 555
18.5 Comparison concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 560
18.6 Object concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 563
18.7 Callable concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 563

Contents © ISO/IEC 2020 – All rights reserved v


ISO/IEC 14882:2020(E)

19 Diagnostics library 565


19.1 General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 565
19.2 Exception classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 565
19.3 Assertions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 568
19.4 Error numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 568
19.5 System error support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 570

20 General utilities library 579


20.1 General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 579
20.2 Utility components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 579
20.3 Compile-time integer sequences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 584
20.4 Pairs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 585
20.5 Tuples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 589
20.6 Optional objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 599
20.7 Variants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 611
20.8 Storage for any type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 622
20.9 Bitsets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 627
20.10 Memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 632
20.11 Smart pointers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 648
20.12 Memory resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 671
20.13 Class template scoped_allocator_adaptor . . . . . . . . . . . . . . . . . . . . . . . . . . 680
20.14 Function objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 684
20.15 Metaprogramming and type traits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 707
20.16 Compile-time rational arithmetic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 732
20.17 Class type_index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 734
20.18 Execution policies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 736
20.19 Primitive numeric conversions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 738
20.20 Formatting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 740

21 Strings library 759


21.1 General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 759
21.2 Character traits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 759
21.3 String classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 764
21.4 String view classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 790
21.5 Null-terminated sequence utilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 800

22 Containers library 805


22.1 General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 805
22.2 Container requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 805
22.3 Sequence containers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 839
22.4 Associative containers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 867
22.5 Unordered associative containers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 885
22.6 Container adaptors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 906
22.7 Views . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 914

23 Iterators library 921


23.1 General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 921
23.2 Header <iterator> synopsis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 921
23.3 Iterator requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 928
23.4 Iterator primitives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 948
23.5 Iterator adaptors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 951
23.6 Stream iterators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 972
23.7 Range access . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 978

24 Ranges library 980


24.1 General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 980
24.2 Header <ranges> synopsis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 980
24.3 Range access . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 985
24.4 Range requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 989

Contents © ISO/IEC 2020 – All rights reserved vi


ISO/IEC 14882:2020(E)

24.5 Range utilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 992


24.6 Range factories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 997
24.7 Range adaptors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1007

25 Algorithms library 1044


25.1 General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1044
25.2 Algorithms requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1044
25.3 Parallel algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1046
25.4 Header <algorithm> synopsis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1049
25.5 Algorithm result types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1084
25.6 Non-modifying sequence operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1087
25.7 Mutating sequence operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1099
25.8 Sorting and related operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1115
25.9 Header <numeric> synopsis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1142
25.10 Generalized numeric operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1145
25.11 Specialized <memory> algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1154
25.12 C library algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1160

26 Numerics library 1161


26.1 General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1161
26.2 Numeric type requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1161
26.3 The floating-point environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1161
26.4 Complex numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1162
26.5 Bit manipulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1170
26.6 Random number generation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1173
26.7 Numeric arrays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1210
26.8 Mathematical functions for floating-point types . . . . . . . . . . . . . . . . . . . . . . . . 1229
26.9 Numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1244

27 Time library 1245


27.1 General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1245
27.2 Header <chrono> synopsis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1245
27.3 Cpp17Clock requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1259
27.4 Time-related traits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1259
27.5 Class template duration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1261
27.6 Class template time_point . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1268
27.7 Clocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1271
27.8 The civil calendar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1282
27.9 Class template hh_mm_ss . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1311
27.10 12/24 hours functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1313
27.11 Time zones . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1313
27.12 Formatting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1326
27.13 Parsing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1330
27.14 Header <ctime> synopsis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1334

28 Localization library 1335


28.1 General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1335
28.2 Header <locale> synopsis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1335
28.3 Locales . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1336
28.4 Standard locale categories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1342
28.5 C library locales . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1374

29 Input/output library 1375


29.1 General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1375
29.2 Iostreams requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1375
29.3 Forward declarations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1376
29.4 Standard iostream objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1378
29.5 Iostreams base classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1380
29.6 Stream buffers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1395

Contents © ISO/IEC 2020 – All rights reserved vii


ISO/IEC 14882:2020(E)

29.7 Formatting and manipulators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1403


29.8 String-based streams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1427
29.9 File-based streams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1441
29.10 Synchronized output streams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1453
29.11 File systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1458
29.12 C library files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1503

30 Regular expressions library 1506


30.1 General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1506
30.2 Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1506
30.3 Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1507
30.4 Header <regex> synopsis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1508
30.5 Namespace std::regex_constants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1512
30.6 Class regex_error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1515
30.7 Class template regex_traits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1515
30.8 Class template basic_regex . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1517
30.9 Class template sub_match . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1522
30.10 Class template match_results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1523
30.11 Regular expression algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1528
30.12 Regular expression iterators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1532
30.13 Modified ECMAScript regular expression grammar . . . . . . . . . . . . . . . . . . . . . . 1537

31 Atomic operations library 1540


31.1 General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1540
31.2 Header <atomic> synopsis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1540
31.3 Type aliases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1544
31.4 Order and consistency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1544
31.5 Lock-free property . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1546
31.6 Waiting and notifying . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1546
31.7 Class template atomic_ref . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1547
31.8 Class template atomic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1553
31.9 Non-member functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1568
31.10 Flag type and operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1568
31.11 Fences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1570

32 Thread support library 1572


32.1 General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1572
32.2 Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1572
32.3 Stop tokens . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1574
32.4 Threads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1579
32.5 Mutual exclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1586
32.6 Condition variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1605
32.7 Semaphore . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1612
32.8 Coordination types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1614
32.9 Futures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1617

Annex A Grammar summary 1632


A.1 General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1632
A.2 Keywords . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1632
A.3 Lexical conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1632
A.4 Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1636
A.5 Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1637
A.6 Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1641
A.7 Declarations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1641
A.8 Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1647
A.9 Classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1648
A.10 Overloading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1649
A.11 Templates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1649
A.12 Exception handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1651

Contents © ISO/IEC 2020 – All rights reserved viii


ISO/IEC 14882:2020(E)

A.13 Preprocessing directives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1651

Annex B Implementation quantities 1653

Annex C Compatibility 1655


C.1 C++ and ISO C++ 2017 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1655
C.2 C++ and ISO C++ 2014 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1662
C.3 C++ and ISO C++ 2011 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1666
C.4 C++ and ISO C++ 2003 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1667
C.5 C++ and ISO C . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1673
C.6 C standard library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1681

Annex D Compatibility features 1683


D.1 General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1683
D.2 Arithmetic conversion on enumerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1683
D.3 Implicit capture of *this by reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1683
D.4 Comma operator in subscript expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . 1683
D.5 Array comparisons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1683
D.6 Deprecated volatile types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1684
D.7 Redeclaration of static constexpr data members . . . . . . . . . . . . . . . . . . . . . . 1684
D.8 Non-local use of TU-local entities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1685
D.9 Implicit declaration of copy functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1685
D.10 C headers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1685
D.11 Requires paragraph . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1686
D.12 Relational operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1686
D.13 char* streams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1687
D.14 Deprecated type traits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1694
D.15 Tuple . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1695
D.16 Variant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1695
D.17 Deprecated iterator class template . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1696
D.18 Deprecated move_iterator access . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1696
D.19 Deprecated shared_ptr atomic access . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1696
D.20 Deprecated basic_string capacity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1698
D.21 Deprecated standard code conversion facets . . . . . . . . . . . . . . . . . . . . . . . . . . 1698
D.22 Deprecated convenience conversion interfaces . . . . . . . . . . . . . . . . . . . . . . . . . 1700
D.23 Deprecated locale category facets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1703
D.24 Deprecated filesystem path factory functions . . . . . . . . . . . . . . . . . . . . . . . . . . 1704
D.25 Deprecated atomic operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1704

Bibliography 1706

Cross references 1707

Cross references from ISO C++ 2017 1731

Index 1734

Index of grammar productions 1768

Index of library headers 1773

Index of library names 1775

Index of library concepts 1847

Index of implementation-defined behavior 1850

Contents © ISO/IEC 2020 – All rights reserved ix


ISO/IEC 14882:2020(E)

Foreword
ISO (the International Organization for Standardization) and IEC (the International Electrotechnical
Commission) form the specialized system for worldwide standardization. National bodies that are members
of ISO or IEC participate in the development of International Standards through technical committees
established by the respective organization to deal with particular fields of technical activity. ISO and IEC
technical committees collaborate in fields of mutual interest. Other international organizations, governmental
and non-governmental, in liaison with ISO and IEC, also take part in the work.
The procedures used to develop this document and those intended for its further maintenance are described in
the ISO/IEC Directives, Part 1. In particular the different approval criteria needed for the different types of
document should be noted. This document was drafted in accordance with the editorial rules of the ISO/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 of patent
rights. ISO and IEC shall not be held responsible for identifying any or all such patent rights. Details of any
patent rights identified during the development of the document will be in the Introduction and/or on the
ISO list of patent declarations received (see www.iso.org/patents) or the IEC list of patent declarations
received (see http://patents.iec.ch).
Any trade name used in this document is information given for the convenience of users and does not
constitute an endorsement.
For an explanation on the voluntary nature of standards, the meaning of ISO specific terms and expressions re-
lated to conformity assessment, as well as information about ISO’s adherence to the World Trade Organization
(WTO) principles in the Technical Barriers to Trade (TBT), see www.iso.org/iso/foreword.html.
This document was prepared by Joint Technical Committee ISO/IEC JTC 1, Information technology,
Subcommittee SC 22, Programming languages, their environments and system software interfaces.
This sixth edition cancels and replaces the fifth edition (ISO/IEC 14882:2017), which has been technically
revised.
The main changes compared to the previous edition are as follows:
— inclusion of the provisions of ISO/IEC TS 19217:2015, ISO/IEC TS 21425:2017, ISO/IEC TS 22277:2017,
ISO/IEC TS 21544:2018, portions of ISO/IEC TS 19571:2016, and portions of ISO/IEC TS 19568:2017.
— addition of concepts, requires-clauses, requires-expressions, and <concepts> (18.3) header
— addition of coroutines, including co_yield, co_await, and co_return keywords and <coroutine>
(17.12.2) header
— addition of modules, import-declarations, and export-declarations
— addition of three-way comparison, defaulted comparisons, rewriting of comparison operator expressions,
and <compare> (17.11.1) header
— addition of designated initializers
— support for class types and floating-point types as the type of a non-type template parameter
— new attributes [[no_unique_address]], [[likely]], [[unlikely]]
— support for optional reason string in [[nodiscard]] attribute
— ability to require constant initialization with constinit keyword
— ability to require constant evaluation with consteval keyword
— extensions to constant evaluation
— support for controlling destruction in a class-specific operator delete function
— addition of using enum declaration
— addition of char8_t type
— support for an initializer statement in range-based for loops

Foreword © ISO/IEC 2020 – All rights reserved x


ISO/IEC 14882:2020(E)

— support for default member initializers for bit-fields


— support for parenthesized aggregate initialization
— extensions to lambda expressions
— extensions to structured bindings
— support for inline namespaces in nested namespace definitions
— support for conditionally-explicit member functions
— extensions to class template argument deduction
— reduced cases in which typename is required
— support for calling an undeclared template-id via argument-dependent name lookup
— revised memory model
— extended support for variadic macros with __VA_OPT__
— feature test macros and <version> (17.3.2) header
— addition of ranges and <ranges> (24.2) header
— addition of calendar and time zone support
— addition of text formatting library and <format> (20.20.1) header
— addition of <barrier> (32.8.3.2), <latch> (32.8.2.2), and <semaphore> (32.7.2) headers
— addition of mathematical constants library and <numbers> (26.9.1) header
— support for representing source locations and <source_location> (17.8.1) header
— addition of span view and <span> (22.7.2) header
— addition of joining thread class and <stop_token> (32.3.2) header
— extensions to atomic types and operations
— addition of unsequenced execution policy
— new utility functions, types, and templates in the standard library
— addition of bit manipulation library and <bit> (26.5.2) header
— addition of a synchronized buffered output stream and <syncstream> (29.10.1) header
— support for heterogeneous lookup for unordered containers
— support for element existence detection in associative containers
— support for move semantics in <numeric> (25.9) algorithms
— support for efficient access to the buffer of a basic_stringbuf
— extended constant expression evaluation support in the standard library
Any feedback or questions on this document should be directed to the user’s national standards body. A
complete listing of these bodies can be found at www.iso.org/members.html.

Foreword © ISO/IEC 2020 – All rights reserved xi


ISO/IEC 14882:2020(E)

1 Scope [intro.scope]
1 This document 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.
2 C++ is a general purpose programming language based on the C programming language as described in
ISO/IEC 9899:2018 Programming languages — C (hereinafter referred to as the C standard). C++ provides
many facilities beyond those provided by C, including additional data types, classes, templates, exceptions,
namespaces, operator overloading, function name overloading, references, free store management operators,
and additional library facilities.

Scope © ISO/IEC 2020 – All rights reserved 1


ISO/IEC 14882:2020(E)

2 Normative references [intro.refs]


1 The following documents are referred to in the text in such a way that some or all of their content constitutes
requirements of this document. For dated references, only the edition cited applies. For undated references,
the latest edition of the referenced document (including any amendments) applies.
(1.1) — ISO/IEC 2382, Information technology — Vocabulary
(1.2) — ISO 8601:2004, Data elements and interchange formats — Information interchange — Representation
of dates and times
(1.3) — ISO/IEC 9899:2018, Programming languages — C
(1.4) — ISO/IEC 9945:2003, Information Technology — Portable Operating System Interface (POSIX1 )
(1.5) — ISO/IEC 10646, Information technology — Universal Coded Character Set (UCS)
(1.6) — ISO/IEC 10646:2003,2 Information technology — Universal Multiple-Octet Coded Character Set (UCS)
(1.7) — ISO 80000-2:2009, Quantities and units — Part 2: Mathematical signs and symbols to be used in the
natural sciences and technology
(1.8) — Ecma International, ECMAScript3 Language Specification, Standard Ecma-262, third edition, 1999.
2 The library described in ISO/IEC 9899:2018, Clause 7, is hereinafter called the C standard library.4
3 The operating system interface described in ISO/IEC 9945:2003 is hereinafter called POSIX.
4 The ECMAScript Language Specification described in Standard Ecma-262 is hereinafter called ECMA-262.
5 [Note 1 : References to ISO/IEC 10646:2003 are used only to support deprecated features (D.21). — end note]

1) POSIX® is a registered trademark of the Institute of Electrical and Electronic Engineers, Inc. This information is given for
the convenience of users of this document and does not constitute an endorsement by ISO or IEC of this product.
2) Cancelled and replaced by ISO/IEC 10646:2017.
3) ECMAScript® is a registered trademark of Ecma International. This information is given for the convenience of users of
this document and does not constitute an endorsement by ISO or IEC of this product.
4) With the qualifications noted in Clause 17 through Clause 32 and in C.6, the C standard library is a subset of the C++
standard library.

Normative references © ISO/IEC 2020 – All rights reserved 2


ISO/IEC 14882:2020(E)

3 Terms and definitions [intro.defs]


1 For the purposes of this document, the terms and definitions given in ISO/IEC 2382, the terms, definitions,
and symbols given in ISO 80000-2:2009, and the following apply.
2 ISO and IEC maintain terminological databases for use in standardization at the following addresses:
(2.1) — ISO Online browsing platform: available at https://www.iso.org/obp
(2.2) — IEC Electropedia: available at http://www.electropedia.org/
3 Terms that are used only in a small portion of this document are defined where they are used and italicized
where they are defined.

3.1 [defns.access]
access
〈execution-time action〉 read or modify the value of an object
[Note 1 to entry: Only objects of scalar type can be accessed. Reads of scalar objects are described in 7.3.2 and
modifications of scalar objects are describred in 7.6.19, 7.6.1.6, and 7.6.2.3. Attempts to read or modify an object of
class type typically invoke a constructor (11.4.5) or assignment operator (11.4.6); such invocations do not themselves
constitute accesses, although they may involve accesses of scalar subobjects. — end note]

3.2 [defns.arbitrary.stream]
arbitrary-positional stream
〈library〉 stream that can seek to any integral position within the length of the stream
[Note 1 to entry: Every arbitrary-positional stream is also a repositional stream (3.42). — end note]

3.3 [defns.argument]
argument
〈function call expression〉 expression in the comma-separated list bounded by the parentheses

3.4 [defns.argument.macro]
argument
〈function-like macro〉 sequence of preprocessing tokens in the comma-separated list bounded by the parentheses

3.5 [defns.argument.throw]
argument
〈throw expression〉 operand of throw

3.6 [defns.argument.templ]
argument
〈template instantiation〉 constant-expression, type-id, or id-expression in the comma-separated list bounded by
the angle brackets

3.7 [defns.block]
block
〈execution〉 wait for some condition (other than for the implementation to execute the execution steps of the
thread of execution) to be satisfied before continuing execution past the blocking operation

3.8 [defns.block.stmt]
block
〈statement〉 compound statement

3.9 [defns.character]
character
〈library〉 object which, when treated sequentially, can represent text
[Note 1 to entry: The term does not mean only char, char8_t, char16_t, char32_t, and wchar_t objects (6.8.2), but
any value that can be represented by a type that provides the definitions specified in Clause 21, Clause 28, Clause 29,
or Clause 30. — end note]

§ 3.9 © ISO/IEC 2020 – All rights reserved 3


Random documents with unrelated
content Scribd suggests to you:
Motor Mart Garage
OLIVE AND WOOSTER STS.
Oils and Gasoline
Turn-auto Repair Service

FRAPPIER’S
BARBER SHOP
100 per cent. CLEAN
Manicure Shoe Shine
211 ELM STREET
Next to Gym.

“Costs less per mile of service”


The new Vesta in handsome hard rubber case, showing how
plates are separated by isolators.

Vesta
STORAGE BATTERY
VESTA BATTERY CORPORATION
CHICAGO

The Brick Row Book Shop, Inc.


Booksellers—Importers—Print Dealers
Connoisseurs and collectors of books and prints both old and
modern should find much of interest in each of our three shops.
We have a large stock of first editions, and are able and glad to
complete your collection of firsts.
If you are building up your library, we have many sets of standard
authors in fine bindings.
We are always ready to secure out-of-print books when it is at all
possible to do so.

The Brick Row Book Shop, Inc.


New York, 19 East 47th St. New Haven, 104 High St.
Princeton, 68½ Nassau Street

THE NEW NASH FOUR SPORT CAR

$1195
f.o.b. factory

NASH
The introduction by Nash of this new Four Sport car can be
termed with justice a notable event.
For here is a car of moderate price whose appeal to your sense of
the beautiful is equally as strong as the preference it arouses
because of its exceptional performance.
The advanced practice displayed in the engineering of this model
is certain to serve as a pattern for four-cylinder development
everywhere in the industry.
And the results achieved in the way of heightened smoothness,
quietness, acceleration, and fuel economy constitute so far a step
forward as to set the car undebatably above and apart from any
comparison.
THE NASH MOTORS COMPANY
KENOSHA, WISCONSIN
Fours and Sixes—Prices Range from $915 to $2190, f. o. b. Factory
NEW HAVEN 522 FIFTH AVENUE
CONNECTICUT NEW YORK CITY

YALE UNIVERSITY PRESS


Announces the Publication of

Poems of Arthur O’Shaughnessy


Selected and Edited by
WILLIAM ALEXANDER PERCY
Mr. Percy says in his remarkable Introduction: “The Yale
University Press, thinking perhaps, with me, that even the most
beautiful things perish if the opportunity for reading or seeing or
hearing them is not offered the vexed and hurrying children of
men, has undertaken here the pious task of making
O’Shaughnessy’s finest poems accessible to readers of English
poetry.... His best is unique, of a haunting beauty, a very precious
heritage.... He had, as Palgrave put it, ‘The exquisite tenderness
of touch, the melody and delicacy’ of his favorite composer,
Chopin.... If I were passing the Siren Isles, one of the songs I
know I should hear drifting across the waves would be that which
Sarrazine sang to her dead lover in Chaitivel:

‘Hath any loved you well, down there,


Summer or winter through?
Down there, have you found any fair
Laid in the grave with you?
Is death’s long kiss a richer kiss
Than mine was wont to be—
Or have you gone to some far bliss
And quite forgotten me?’”

O’Shaughnessy died in 1881. Until the publication of this


admirably edited volume, no considerable part of his work has
been commonly available for many years.
Price $2.00.
*** END OF THE PROJECT GUTENBERG EBOOK THE YALE
LITERARY MAGAZINE (VOL. LXXXVIII, NO. 5, FEBRUARY 1923)
***

Updated editions will replace the previous one—the old editions


will be renamed.

Creating the works from print editions not protected by U.S.


copyright law means that no one owns a United States copyright
in these works, so the Foundation (and you!) can copy and
distribute it in the United States without permission and without
paying copyright royalties. Special rules, set forth in the General
Terms of Use part of this license, apply to copying and
distributing Project Gutenberg™ electronic works to protect the
PROJECT GUTENBERG™ concept and trademark. Project
Gutenberg is a registered trademark, and may not be used if
you charge for an eBook, except by following the terms of the
trademark license, including paying royalties for use of the
Project Gutenberg trademark. If you do not charge anything for
copies of this eBook, complying with the trademark license is
very easy. You may use this eBook for nearly any purpose such
as creation of derivative works, reports, performances and
research. Project Gutenberg eBooks may be modified and
printed and given away—you may do practically ANYTHING in
the United States with eBooks not protected by U.S. copyright
law. Redistribution is subject to the trademark license, especially
commercial redistribution.

START: FULL LICENSE


THE FULL PROJECT GUTENBERG LICENSE
PLEASE READ THIS BEFORE YOU DISTRIBUTE OR USE THIS WORK

To protect the Project Gutenberg™ mission of promoting the


free distribution of electronic works, by using or distributing this
work (or any other work associated in any way with the phrase
“Project Gutenberg”), you agree to comply with all the terms of
the Full Project Gutenberg™ License available with this file or
online at www.gutenberg.org/license.

Section 1. General Terms of Use and


Redistributing Project Gutenberg™
electronic works
1.A. By reading or using any part of this Project Gutenberg™
electronic work, you indicate that you have read, understand,
agree to and accept all the terms of this license and intellectual
property (trademark/copyright) agreement. If you do not agree to
abide by all the terms of this agreement, you must cease using
and return or destroy all copies of Project Gutenberg™
electronic works in your possession. If you paid a fee for
obtaining a copy of or access to a Project Gutenberg™
electronic work and you do not agree to be bound by the terms
of this agreement, you may obtain a refund from the person or
entity to whom you paid the fee as set forth in paragraph 1.E.8.

1.B. “Project Gutenberg” is a registered trademark. It may only


be used on or associated in any way with an electronic work by
people who agree to be bound by the terms of this agreement.
There are a few things that you can do with most Project
Gutenberg™ electronic works even without complying with the
full terms of this agreement. See paragraph 1.C below. There
are a lot of things you can do with Project Gutenberg™
electronic works if you follow the terms of this agreement and
help preserve free future access to Project Gutenberg™
electronic works. See paragraph 1.E below.
1.C. The Project Gutenberg Literary Archive Foundation (“the
Foundation” or PGLAF), owns a compilation copyright in the
collection of Project Gutenberg™ electronic works. Nearly all the
individual works in the collection are in the public domain in the
United States. If an individual work is unprotected by copyright
law in the United States and you are located in the United
States, we do not claim a right to prevent you from copying,
distributing, performing, displaying or creating derivative works
based on the work as long as all references to Project
Gutenberg are removed. Of course, we hope that you will
support the Project Gutenberg™ mission of promoting free
access to electronic works by freely sharing Project
Gutenberg™ works in compliance with the terms of this
agreement for keeping the Project Gutenberg™ name
associated with the work. You can easily comply with the terms
of this agreement by keeping this work in the same format with
its attached full Project Gutenberg™ License when you share it
without charge with others.

1.D. The copyright laws of the place where you are located also
govern what you can do with this work. Copyright laws in most
countries are in a constant state of change. If you are outside
the United States, check the laws of your country in addition to
the terms of this agreement before downloading, copying,
displaying, performing, distributing or creating derivative works
based on this work or any other Project Gutenberg™ work. The
Foundation makes no representations concerning the copyright
status of any work in any country other than the United States.

1.E. Unless you have removed all references to Project


Gutenberg:

1.E.1. The following sentence, with active links to, or other


immediate access to, the full Project Gutenberg™ License must
appear prominently whenever any copy of a Project
Gutenberg™ work (any work on which the phrase “Project
Gutenberg” appears, or with which the phrase “Project
Gutenberg” is associated) is accessed, displayed, performed,
viewed, copied or distributed:

This eBook is for the use of anyone anywhere in the United


States and most other parts of the world at no cost and with
almost no restrictions whatsoever. You may copy it, give it
away or re-use it under the terms of the Project Gutenberg
License included with this eBook or online at
www.gutenberg.org. If you are not located in the United
States, you will have to check the laws of the country where
you are located before using this eBook.

1.E.2. If an individual Project Gutenberg™ electronic work is


derived from texts not protected by U.S. copyright law (does not
contain a notice indicating that it is posted with permission of the
copyright holder), the work can be copied and distributed to
anyone in the United States without paying any fees or charges.
If you are redistributing or providing access to a work with the
phrase “Project Gutenberg” associated with or appearing on the
work, you must comply either with the requirements of
paragraphs 1.E.1 through 1.E.7 or obtain permission for the use
of the work and the Project Gutenberg™ trademark as set forth
in paragraphs 1.E.8 or 1.E.9.

1.E.3. If an individual Project Gutenberg™ electronic work is


posted with the permission of the copyright holder, your use and
distribution must comply with both paragraphs 1.E.1 through
1.E.7 and any additional terms imposed by the copyright holder.
Additional terms will be linked to the Project Gutenberg™
License for all works posted with the permission of the copyright
holder found at the beginning of this work.

1.E.4. Do not unlink or detach or remove the full Project


Gutenberg™ License terms from this work, or any files
containing a part of this work or any other work associated with
Project Gutenberg™.
1.E.5. Do not copy, display, perform, distribute or redistribute
this electronic work, or any part of this electronic work, without
prominently displaying the sentence set forth in paragraph 1.E.1
with active links or immediate access to the full terms of the
Project Gutenberg™ License.

1.E.6. You may convert to and distribute this work in any binary,
compressed, marked up, nonproprietary or proprietary form,
including any word processing or hypertext form. However, if
you provide access to or distribute copies of a Project
Gutenberg™ work in a format other than “Plain Vanilla ASCII” or
other format used in the official version posted on the official
Project Gutenberg™ website (www.gutenberg.org), you must, at
no additional cost, fee or expense to the user, provide a copy, a
means of exporting a copy, or a means of obtaining a copy upon
request, of the work in its original “Plain Vanilla ASCII” or other
form. Any alternate format must include the full Project
Gutenberg™ License as specified in paragraph 1.E.1.

1.E.7. Do not charge a fee for access to, viewing, displaying,


performing, copying or distributing any Project Gutenberg™
works unless you comply with paragraph 1.E.8 or 1.E.9.

1.E.8. You may charge a reasonable fee for copies of or


providing access to or distributing Project Gutenberg™
electronic works provided that:

• You pay a royalty fee of 20% of the gross profits you derive from
the use of Project Gutenberg™ works calculated using the
method you already use to calculate your applicable taxes. The
fee is owed to the owner of the Project Gutenberg™ trademark,
but he has agreed to donate royalties under this paragraph to
the Project Gutenberg Literary Archive Foundation. Royalty
payments must be paid within 60 days following each date on
which you prepare (or are legally required to prepare) your
periodic tax returns. Royalty payments should be clearly marked
as such and sent to the Project Gutenberg Literary Archive
Foundation at the address specified in Section 4, “Information
about donations to the Project Gutenberg Literary Archive
Foundation.”

• You provide a full refund of any money paid by a user who


notifies you in writing (or by e-mail) within 30 days of receipt that
s/he does not agree to the terms of the full Project Gutenberg™
License. You must require such a user to return or destroy all
copies of the works possessed in a physical medium and
discontinue all use of and all access to other copies of Project
Gutenberg™ works.

• You provide, in accordance with paragraph 1.F.3, a full refund of


any money paid for a work or a replacement copy, if a defect in
the electronic work is discovered and reported to you within 90
days of receipt of the work.

• You comply with all other terms of this agreement for free
distribution of Project Gutenberg™ works.

1.E.9. If you wish to charge a fee or distribute a Project


Gutenberg™ electronic work or group of works on different
terms than are set forth in this agreement, you must obtain
permission in writing from the Project Gutenberg Literary
Archive Foundation, the manager of the Project Gutenberg™
trademark. Contact the Foundation as set forth in Section 3
below.

1.F.

1.F.1. Project Gutenberg volunteers and employees expend


considerable effort to identify, do copyright research on,
transcribe and proofread works not protected by U.S. copyright
law in creating the Project Gutenberg™ collection. Despite
these efforts, Project Gutenberg™ electronic works, and the
medium on which they may be stored, may contain “Defects,”
such as, but not limited to, incomplete, inaccurate or corrupt
data, transcription errors, a copyright or other intellectual
property infringement, a defective or damaged disk or other
medium, a computer virus, or computer codes that damage or
cannot be read by your equipment.

1.F.2. LIMITED WARRANTY, DISCLAIMER OF DAMAGES -


Except for the “Right of Replacement or Refund” described in
paragraph 1.F.3, the Project Gutenberg Literary Archive
Foundation, the owner of the Project Gutenberg™ trademark,
and any other party distributing a Project Gutenberg™ electronic
work under this agreement, disclaim all liability to you for
damages, costs and expenses, including legal fees. YOU
AGREE THAT YOU HAVE NO REMEDIES FOR NEGLIGENCE,
STRICT LIABILITY, BREACH OF WARRANTY OR BREACH
OF CONTRACT EXCEPT THOSE PROVIDED IN PARAGRAPH
1.F.3. YOU AGREE THAT THE FOUNDATION, THE
TRADEMARK OWNER, AND ANY DISTRIBUTOR UNDER
THIS AGREEMENT WILL NOT BE LIABLE TO YOU FOR
ACTUAL, DIRECT, INDIRECT, CONSEQUENTIAL, PUNITIVE
OR INCIDENTAL DAMAGES EVEN IF YOU GIVE NOTICE OF
THE POSSIBILITY OF SUCH DAMAGE.

1.F.3. LIMITED RIGHT OF REPLACEMENT OR REFUND - If


you discover a defect in this electronic work within 90 days of
receiving it, you can receive a refund of the money (if any) you
paid for it by sending a written explanation to the person you
received the work from. If you received the work on a physical
medium, you must return the medium with your written
explanation. The person or entity that provided you with the
defective work may elect to provide a replacement copy in lieu
of a refund. If you received the work electronically, the person or
entity providing it to you may choose to give you a second
opportunity to receive the work electronically in lieu of a refund.
If the second copy is also defective, you may demand a refund
in writing without further opportunities to fix the problem.

1.F.4. Except for the limited right of replacement or refund set


forth in paragraph 1.F.3, this work is provided to you ‘AS-IS’,
WITH NO OTHER WARRANTIES OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO
WARRANTIES OF MERCHANTABILITY OR FITNESS FOR
ANY PURPOSE.

1.F.5. Some states do not allow disclaimers of certain implied


warranties or the exclusion or limitation of certain types of
damages. If any disclaimer or limitation set forth in this
agreement violates the law of the state applicable to this
agreement, the agreement shall be interpreted to make the
maximum disclaimer or limitation permitted by the applicable
state law. The invalidity or unenforceability of any provision of
this agreement shall not void the remaining provisions.

1.F.6. INDEMNITY - You agree to indemnify and hold the


Foundation, the trademark owner, any agent or employee of the
Foundation, anyone providing copies of Project Gutenberg™
electronic works in accordance with this agreement, and any
volunteers associated with the production, promotion and
distribution of Project Gutenberg™ electronic works, harmless
from all liability, costs and expenses, including legal fees, that
arise directly or indirectly from any of the following which you do
or cause to occur: (a) distribution of this or any Project
Gutenberg™ work, (b) alteration, modification, or additions or
deletions to any Project Gutenberg™ work, and (c) any Defect
you cause.

Section 2. Information about the Mission of


Project Gutenberg™
Project Gutenberg™ is synonymous with the free distribution of
electronic works in formats readable by the widest variety of
computers including obsolete, old, middle-aged and new
computers. It exists because of the efforts of hundreds of
volunteers and donations from people in all walks of life.

Volunteers and financial support to provide volunteers with the


assistance they need are critical to reaching Project
Gutenberg™’s goals and ensuring that the Project Gutenberg™
collection will remain freely available for generations to come. In
2001, the Project Gutenberg Literary Archive Foundation was
created to provide a secure and permanent future for Project
Gutenberg™ and future generations. To learn more about the
Project Gutenberg Literary Archive Foundation and how your
efforts and donations can help, see Sections 3 and 4 and the
Foundation information page at www.gutenberg.org.

Section 3. Information about the Project


Gutenberg Literary Archive Foundation
The Project Gutenberg Literary Archive Foundation is a non-
profit 501(c)(3) educational corporation organized under the
laws of the state of Mississippi and granted tax exempt status by
the Internal Revenue Service. The Foundation’s EIN or federal
tax identification number is 64-6221541. Contributions to the
Project Gutenberg Literary Archive Foundation are tax
deductible to the full extent permitted by U.S. federal laws and
your state’s laws.

The Foundation’s business office is located at 809 North 1500


West, Salt Lake City, UT 84116, (801) 596-1887. Email contact
links and up to date contact information can be found at the
Foundation’s website and official page at
www.gutenberg.org/contact

Section 4. Information about Donations to


the Project Gutenberg Literary Archive
Foundation
Project Gutenberg™ depends upon and cannot survive without
widespread public support and donations to carry out its mission
of increasing the number of public domain and licensed works
that can be freely distributed in machine-readable form
accessible by the widest array of equipment including outdated
equipment. Many small donations ($1 to $5,000) are particularly
important to maintaining tax exempt status with the IRS.

The Foundation is committed to complying with the laws


regulating charities and charitable donations in all 50 states of
the United States. Compliance requirements are not uniform
and it takes a considerable effort, much paperwork and many
fees to meet and keep up with these requirements. We do not
solicit donations in locations where we have not received written
confirmation of compliance. To SEND DONATIONS or
determine the status of compliance for any particular state visit
www.gutenberg.org/donate.

While we cannot and do not solicit contributions from states


where we have not met the solicitation requirements, we know
of no prohibition against accepting unsolicited donations from
donors in such states who approach us with offers to donate.

International donations are gratefully accepted, but we cannot


make any statements concerning tax treatment of donations
received from outside the United States. U.S. laws alone swamp
our small staff.

Please check the Project Gutenberg web pages for current


donation methods and addresses. Donations are accepted in a
number of other ways including checks, online payments and
credit card donations. To donate, please visit:
www.gutenberg.org/donate.

Section 5. General Information About Project


Gutenberg™ electronic works
Professor Michael S. Hart was the originator of the Project
Gutenberg™ concept of a library of electronic works that could
be freely shared with anyone. For forty years, he produced and
distributed Project Gutenberg™ eBooks with only a loose
network of volunteer support.

Project Gutenberg™ eBooks are often created from several


printed editions, all of which are confirmed as not protected by
copyright in the U.S. unless a copyright notice is included. Thus,
we do not necessarily keep eBooks in compliance with any
particular paper edition.

Most people start at our website which has the main PG search
facility: www.gutenberg.org.

This website includes information about Project Gutenberg™,


including how to make donations to the Project Gutenberg
Literary Archive Foundation, how to help produce our new
eBooks, and how to subscribe to our email newsletter to hear
about new eBooks.

You might also like