文档介绍:Doc No: N2798=08-0308
Date: 2008-10-04
Reply to: Pete Becker
Roundhouse Consulting, Ltd.
pete@
Working Draft, Standard for Programming
Language C++
Note: this is an early draft. It’s known to be plet and incorrekt, and it has lots of bad
formatting.
c ISO/IEC N2798=08-0308
Contents
Contents ii
List of Tables ix
1 General 1
Scope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Normative references . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
pliance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Structure of this International Standard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Syntax notation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
The C++ memory model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
The C++ object model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Program execution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Multi-threaded executions and data races . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
2 Lexical conventions 15
Phases of translation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Character sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Trigraph sequences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Preprocessing tokens . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .