1 - AS/NZS 14882:1999 PROGRAMMING LANGUAGES- C++
4 - PREFACE
5 - CONTENTS
29 - 1 General
29 - 1.1 Scope
29 - 1.2 Normative references
29 - 1.3 Definitions
31 - 1.4 Implementation compliance
32 - 1.5 Structure of this International Standard
32 - 1.6 Syntax notation
32 - 1.7 The C++ memory model
32 - 1.8 The C++ object model
33 - 1.9 Program execution
36 - 1.10 Acknowledgments
37 - 2 Lexical conventions
37 - 2.1 Phases of translation
38 - 2.2 Character sets
39 - 2.3 Trigraph sequences
39 - 2.4 Preprocessing tokens
40 - 2.5 Alternative tokens
40 - 2.6 Tokens
40 - 2.7 Comments
41 - 2.8 Header names
41 - 2.9 Preprocessing numbers
41 - 2.10 Identifiers
42 - 2.11 Keywords
43 - 2.12 Operators and punctuators
43 - 2.13 Literals
43 - 2.13.1 Integer literals
44 - 2.13.2 Character literals
46 - 2.13.3 Floating literals
47 - 2.13.4 String literals
47 - 2.13.5 Boolean literals
49 - 3 Basic concepts
49 - 3.1 Declarations and definitions
50 - 3.2 One definition rule
52 - 3.3 Declarative regions and scopes
53 - 3.3.1 Point of declaration
54 - 3.3.2 Local scope
54 - 3.3.3 Function prototype scope
55 - 3.3.4 Function scope
55 - 3.3.5 Namespace scope
55 - 3.3.6 Class scope
56 - 3.3.7 Name hiding
57 - 3.4 Name lookup
57 - 3.4.1 Unqualified name lookup
60 - 3.4.2 Argument dependent name lookup
61 - 3.4.3 Qualified name lookup
63 - 3.4.3.1 Class members
63 - 3.4.3.2 Namespace members
66 - 3.4.4 Elaborated type specifiers
67 - 3.4.5 Class member access
68 - 3.4.6 Using directives and namespace aliases
69 - 3.5 Program and linkage
71 - 3.6 Start and termination
71 - 3.6.1 Main function
72 - 3.6.2 Initialization of non local objects
73 - 3.6.3 Termination
73 - 3.7 Storage duration
74 - 3.7.1 Static storage duration
74 - 3.7.2 Automatic storage duration
74 - 3.7.3 Dynamic storage duration
75 - 3.7.3.1 Allocation functions
75 - 3.7.3.2 Deallocation functions
76 - 3.7.4 Duration of sub objects
76 - 3.8 Object Lifetime
79 - 3.9 Types
81 - 3.9.1 Fundamental types
82 - 3.9.2 Compound types
83 - 3.9.3 CV qualifiers
83 - 3.10 Lvalues and rvalues
85 - 4 Standard conversions
85 - 4.1 Lvalue to rvalue conversion
86 - 4.2 Array to pointer conversion
86 - 4.3 Function to pointer conversion
86 - 4.4 Qualification conversions
87 - 4.5 Integral promotions
87 - 4.6 Floating point promotion
88 - 4.7 Integral conversions
88 - 4.8 Floating point conversions
88 - 4.9 Floating integral conversions
88 - 4.10 Pointer conversions
89 - 4.11 Pointer to member conversions
89 - 4.12 Boolean conversions
91 - 5 Expressions
92 - 5.1 Primary expressions
94 - 5.2 Postfix expressions
94 - 5.2.1 Subscripting
94 - 5.2.2 Function call
96 - 5.2.3 Explicit type conversion (functional notation)
96 - 5.2.4 Pseudo destructor call
96 - 5.2.5 Class member access
97 - 5.2.6 Increment and decrement
98 - 5.2.7 Dynamic cast
99 - 5.2.8 Type identification
100 - 5.2.9 Static cast
101 - 5.2.10 Reinterpret cast
102 - 5.2.11 Const cast
104 - 5.3 Unary expressions
104 - 5.3.1 Unary operators
105 - 5.3.2 Increment and decrement
105 - 5.3.3 Sizeof
106 - 5.3.4 New
109 - 5.3.5 Delete
110 - 5.4 Explicit type conversion (cast notation)
111 - 5.5 Pointer to member operators
111 - 5.6 Multiplicative operators
112 - 5.7 Additive operators
113 - 5.8 Shift operators
113 - 5.9 Relational operators
114 - 5.10 Equality operators
115 - 5.11 Bitwise AND operator
115 - 5.12 Bitwise exclusive OR operator
115 - 5.13 Bitwise inclusive OR operator
115 - 5.14 Logical AND operator
116 - 5.15 Logical OR operator
116 - 5.16 Conditional operator
117 - 5.17 Assignment operators
118 - 5.18 Comma operator
118 - 5.19 Constant expressions
121 - 6 Statements
121 - 6.1 Labeled statement
121 - 6.2 Expression statement
121 - 6.3 Compound statement or block
122 - 6.4 Selection statements
123 - 6.4.1 The if statement
123 - 6.4.2 The switch statement
123 - 6.5 Iteration statements
124 - 6.5.1 The while statement
124 - 6.5.2 The do statement
125 - 6.5.3 The for statement
125 - 6.6 Jump statements
125 - 6.6.1 The break statement
126 - 6.6.2 The continue statement
126 - 6.6.3 The return statement
126 - 6.6.4 The goto statement
126 - 6.7 Declaration statement
127 - 6.8 Ambiguity resolution
129 - 7 Declarations
130 - 7.1 Specifiers
131 - 7.1.1 Storage class specifiers
132 - 7.1.2 Function specifiers
133 - 7.1.3 The typedef specifier
134 - 7.1.4 The friend specifier
134 - 7.1.5 Type specifiers
135 - 7.1.5.1 The cv qualifiers
136 - 7.1.5.2 Simple type specifiers
137 - 7.1.5.3 Elaborated type specifiers
138 - 7.2 Enumeration declarations
140 - 7.3 Namespaces
140 - 7.3.1 Namespace definition
141 - 7.3.1.1 Unnamed namespaces
141 - 7.3.1.2 Namespace member definitions
143 - 7.3.2 Namespace alias
143 - 7.3.3 The using declaration
148 - 7.3.4 Using directive
151 - 7.4 The asm declaration
151 - 7.5 Linkage specifications
155 - 8 Declarators
156 - 8.1 Type names
156 - 8.2 Ambiguity resolution
158 - 8.3 Meaning of declarators
159 - 8.3.1 Pointers
160 - 8.3.2 References
161 - 8.3.3 Pointers to members
161 - 8.3.4 Arrays
163 - 8.3.5 Functions
165 - 8.3.6 Default arguments
168 - 8.4 Function definitions
169 - 8.5 Initializers
172 - 8.5.1 Aggregates
174 - 8.5.2 Character arrays
175 - 8.5.3 References
177 - 9 Classes
177 - 9.1 Class names
179 - 9.2 Class members
181 - 9.3 Member functions
182 - 9.3.1 Nonstatic member functions
183 - 9.3.2 The this pointer
184 - 9.4 Static members
185 - 9.4.1 Static member functions
185 - 9.4.2 Static data members
186 - 9.5 Unions
187 - 9.6 Bit fields
188 - 9.7 Nested class declarations
189 - 9.8 Local class declarations
189 - 9.9 Nested type names
191 - 10 Derived classes
192 - 10.1 Multiple base classes
193 - 10.2 Member name lookup
196 - 10.3 Virtual functions
200 - 10.4 Abstract classes
203 - 11 Member access control
204 - 11.1 Access specifiers
205 - 11.2 Accessibility of base classes and base class members
206 - 11.3 Access declarations
207 - 11.4 Friends
210 - 11.5 Protected member access
211 - 11.6 Access to virtual functions
211 - 11.7 Multiple access
212 - 11.8 Nested classes
213 - 12 Special member functions
213 - 12.1 Constructors
215 - 12.2 Temporary objects
216 - 12.3 Conversions
217 - 12.3.1 Conversion by constructor
218 - 12.3.2 Conversion functions
219 - 12.4 Destructors
222 - 12.5 Free store
223 - 12.6 Initialization
224 - 12.6.1 Explicit initialization
225 - 12.6.2 Initializing bases and members
228 - 12.7 Construction and destruction
231 - 12.8 Copying class objects
237 - 13 Overloading
237 - 13.1 Overloadable declarations
239 - 13.2 Declaration matching
240 - 13.3 Overload resolution
241 - 13.3.1 Candidate functions and argument lists
242 - 13.3.1.1 Function call syntax
242 - 13.3.1.1.1 Call to named function
243 - 13.3.1.1.2 Call to object of class type
244 - 13.3.1.2 Operators in expressions
246 - 13.3.1.3 Initialization by constructor
246 - 13.3.1.4 Copy initialization of class by user defined conversion
246 - 13.3.1.5 Initialization by conversion function
247 - 13.3.1.6 Initialization by conversion function for direct reference binding
247 - 13.3.2 Viable functions
247 - 13.3.3 Best Viable Function
249 - 13.3.3.1 Implicit conversion sequences
250 - 13.3.3.1.1 Standard conversion sequences
251 - 13.3.3.1.2 User defined conversion sequences
251 - 13.3.3.1.3 Ellipsis conversion sequences
252 - 13.3.3.1.4 Reference binding
252 - 13.3.3.2 Ranking implicit conversion sequences
254 - 13.4 Address of overloaded function
255 - 13.5 Overloaded operators
256 - 13.5.1 Unary operators
257 - 13.5.2 Binary operators
257 - 13.5.3 Assignment
257 - 13.5.4 Function call
258 - 13.5.5 Subscripting
258 - 13.5.6 Class member access
258 - 13.5.7 Increment and decrement
259 - 13.6 Built in operators
263 - 14 Templates
264 - 14.1 Template parameters
266 - 14.2 Names of template specializations
267 - 14.3 Template arguments
269 - 14.3.1 Template type arguments
270 - 14.3.2 Template non type arguments
271 - 14.3.3 Template template arguments
272 - 14.4 Type equivalence
272 - 14.5 Template declarations
272 - 14.5.1 Class templates
273 - 14.5.1.1 Member functions of class templates
274 - 14.5.1.2 Member classes of class templates
274 - 14.5.1.3 Static data members of class templates
274 - 14.5.2 Member templates
276 - 14.5.3 Friends
278 - 14.5.4 Class template partial specializations
280 - 14.5.4.1 Matching of class template partial specializations
280 - 14.5.4.2 Partial ordering of class template specializations
281 - 14.5.4.3 Members of class template specializations
282 - 14.5.5 Function templates
282 - 14.5.5.1 Function template overloading
284 - 14.5.5.2 Partial ordering of function templates
285 - 14.6 Name resolution
288 - 14.6.1 Locally declared names
290 - 14.6.2 Dependent names
291 - 14.6.2.1 Dependent types
291 - 14.6.2.2 Type dependent expressions
292 - 14.6.2.3 Value dependent expressions
292 - 14.6.2.4 Dependent template arguments
293 - 14.6.3 Non dependent names
293 - 14.6.4 Dependent name resolution
293 - 14.6.4.1 Point of instantiation
294 - 14.6.4.2 Candidate functions
294 - 14.6.5 Friend names declared within a class template
295 - 14.7 Template instantiation and specialization
296 - 14.7.1 Implicit instantiation
299 - 14.7.2 Explicit instantiation
300 - 14.7.3 Explicit specialization
305 - 14.8 Function template specializations
306 - 14.8.1 Explicit template argument specification
308 - 14.8.2 Template argument deduction
310 - 14.8.2.1 Deducing template arguments from a function call
311 - 14.8.2.2 Deducing template arguments taking the address of a function template
311 - 14.8.2.3 Deducing conversion function template arguments
311 - 14.8.2.4 Deducing template arguments from a type
316 - 14.8.3 Overload resolution
319 - 15 Exception handling
320 - 15.1 Throwing an exception
322 - 15.2 Constructors and destructors
322 - 15.3 Handling an exception
324 - 15.4 Exception specifications
326 - 15.5 Special functions
326 - 15.5.1 The terminate() function
327 - 15.5.2 The unexpected() function
327 - 15.5.3 The uncaught_exception() function
327 - 15.6 Exceptions and access
329 - 16 Preprocessing directives
330 - 16.1 Conditional inclusion
331 - 16.2 Source file inclusion
332 - 16.3 Macro replacement
333 - 16.3.1 Argument substitution
333 - 16.3.2 The # operator
334 - 16.3.3 The ## operator
334 - 16.3.4 Rescanning and further replacement
334 - 16.3.5 Scope of macro definitions
336 - 16.4 Line control
336 - 16.5 Error directive
336 - 16.6 Pragma directive
336 - 16.7 Null directive
337 - 16.8 Predefined macro names
339 - 17 Library introduction
339 - 17.1 Definitions
341 - 17.2 Additional definitions
341 - 17.3 Method of description (Informative)
341 - 17.3.1 Structure of each subclause
342 - 17.3.1.1 Summary
342 - 17.3.1.2 Requirements
342 - 17.3.1.3 Specifications
343 - 17.3.1.4 C Library
343 - 17.3.2 Other conventions
343 - 17.3.2.1 Type descriptions
344 - 17.3.2.1.1 Enumerated types
344 - 17.3.2.1.2 Bitmask types
345 - 17.3.2.1.3 Character sequences
345 - 17.3.2.1.3.1 Byte strings
346 - 17.3.2.1.3.2 Multibyte strings
346 - 17.3.2.1.3.3 Wide character sequences
346 - 17.3.2.2 Functions within classes
346 - 17.3.2.3 Private members
346 - 17.4 Library wide requirements
347 - 17.4.1 Library contents and organization
347 - 17.4.1.1 Library contents
347 - 17.4.1.2 Headers
348 - 17.4.1.3 Freestanding implementations
348 - 17.4.2 Using the library
348 - 17.4.2.1 Headers
349 - 17.4.2.2 Linkage
349 - 17.4.3 Constraints on programs
349 - 17.4.3.1 Reserved names
349 - 17.4.3.1.1 Macro names
349 - 17.4.3.1.2 Global names
350 - 17.4.3.1.3 External linkage
350 - 17.4.3.1.4 Types
350 - 17.4.3.2 Headers
350 - 17.4.3.3 Derived classes
350 - 17.4.3.4 Replacement functions
351 - 17.4.3.5 Handler functions
351 - 17.4.3.6 Other functions
352 - 17.4.3.7 Function arguments
352 - 17.4.3.8 Required paragraph
352 - 17.4.4 Conforming implementations
352 - 17.4.4.1 Headers
352 - 17.4.4.2 Restrictions on macro definitions
352 - 17.4.4.3 Global functions
353 - 17.4.4.4 Member functions
353 - 17.4.4.5 Reentrancy
353 - 17.4.4.6 Protection within classes
353 - 17.4.4.7 Derived classes
353 - 17.4.4.8 Restrictions on exception handling
355 - 18 Language support library
355 - 18.1 Types
356 - 18.2 Implementation properties
356 - 18.2.1 Numeric limits
356 - 18.2.1.1 Template class numeric_limits
357 - 18.2.1.2 numeric_limits members
361 - 18.2.1.3 Type float_round_style
362 - 18.2.1.4 Type float_denorm_style
362 - 18.2.1.5 numeric_limits specializations
363 - 18.2.2 C Library
364 - 18.3 Start and termination
365 - 18.4 Dynamic memory management
365 - 18.4.1 Storage allocation and deallocation
365 - 18.4.1.1 Single object forms
366 - 18.4.1.2 Array forms
367 - 18.4.1.3 Placement forms
368 - 18.4.2 Storage allocation errors
368 - 18.4.2.1 Class bad_alloc
368 - 18.4.2.2 Type new_handler
369 - 18.4.2.3 set_new_handler
369 - 18.5 Type identification
369 - 18.5.1 Class type_info
370 - 18.5.2 Class bad_cast
370 - 18.5.3 Class bad_typeid
371 - 18.6 Exception handling
371 - 18.6.1 Class exception
372 - 18.6.2 Violating exception specifications
372 - 18.6.2.1 Class bad_exception
373 - 18.6.2.2 Type unexpected_handler
373 - 18.6.2.3 set_unexpected
373 - 18.6.2.4 unexpected
373 - 18.6.3 Abnormal termination
373 - 18.6.3.1 Type terminate_handler
373 - 18.6.3.2 set_terminate
373 - 18.6.3.3 terminate
374 - 18.6.4 uncaught_exception
374 - 18.7 Other runtime support
377 - 19 Diagnostics library
377 - 19.1 Exception classes
377 - 19.1.1 Class logic_error
378 - 19.1.2 Class domain_error
378 - 19.1.3 Class invalid_argument
378 - 19.1.4 Class length_error
379 - 19.1.5 Class out_of_range
379 - 19.1.6 Class runtime_error
379 - 19.1.7 Class range_error
379 - 19.1.8 Class overflow_error
380 - 19.2 Assertions
380 - 19.3 Error numbers
381 - 20 General utilities library
381 - 20.1 Requirements
381 - 20.1.1 Equality comparison
381 - 20.1.2 Less than comparison
382 - 20.1.3 Copy construction
382 - 20.1.4 Default construction
382 - 20.1.5 Allocator requirements
385 - 20.2 Utility components
385 - 20.2.1 Operators
386 - 20.2.2 Pairs
387 - 20.3 Function objects
389 - 20.3.1 Base
389 - 20.3.2 Arithmetic operations
390 - 20.3.3 Comparisons
391 - 20.3.4 Logical operations
391 - 20.3.5 Negators
392 - 20.3.6 Binders
392 - 20.3.6.1 Template class binder1st
392 - 20.3.6.2 bind1st
392 - 20.3.6.3 Template class binder2nd
393 - 20.3.6.4 bind2nd
393 - 20.3.7 Adaptors for pointers to functions
394 - 20.3.8 Adaptors for pointers to members
396 - 20.4 Memory
396 - 20.4.1 The default allocator
397 - 20.4.1.1 allocator members
398 - 20.4.1.2 allocator globals
398 - 20.4.2 Raw storage iterator
399 - 20.4.3 Temporary buffers
399 - 20.4.4 Specialized algorithms
399 - 20.4.4.1 uninitialized_copy
400 - 20.4.4.2 uninitialized_fill
400 - 20.4.4.3 uninitialized_fill_n
400 - 20.4.5 Template class auto_ptr
401 - 20.4.5.1 auto_ptr constructors
401 - 20.4.5.2 auto_ptr members
402 - 20.4.5.3 auto_ptr conversions
402 - 20.4.6 C Library
403 - 20.5 Date and time
405 - 21 Strings library
405 - 21.1 Character traits
405 - 21.1.1 Character traits requirements
407 - 21.1.2 traits typedefs
407 - 21.1.3 char_traits specializations
407 - 21.1.3.1 struct char_traits
408 - 21.1.3.2 struct char_traits
409 - 21.2 String classes
411 - 21.3 Template class basic_string
415 - 21.3.1 basic_string constructors
418 - 21.3.2 basic_string iterator support
418 - 21.3.3 basic_string capacity
419 - 21.3.4 basic_string element access
420 - 21.3.5 basic_string modifiers
420 - 21.3.5.1 basic_string::operator+=
420 - 21.3.5.2 basic_string::append
421 - 21.3.5.3 basic_string::assign
421 - 21.3.5.4 basic_string::insert
422 - 21.3.5.5 basic_string::erase
423 - 21.3.5.6 basic_string::replace
424 - 21.3.5.7 basic_string::copy
425 - 21.3.5.8 basic_string::swap
425 - 21.3.6 basic_string string operations
425 - 21.3.6.1 basic_string::find
426 - 21.3.6.2 basic_string::rfind
426 - 21.3.6.3 basic_string::find_first_of
427 - 21.3.6.4 basic_string::find_last_of
427 - 21.3.6.5 basic_string::find_first_not_of
428 - 21.3.6.6 basic_string::find_last_not_of
428 - 21.3.6.7 basic_string::substr
428 - 21.3.6.8 basic_string::compare
429 - 21.3.7 basic_string non member functions
429 - 21.3.7.1 operator+
430 - 21.3.7.2 operator==
430 - 21.3.7.3 operator!=
431 - 21.3.7.4 operator<
431 - 21.3.7.5 operator>
431 - 21.3.7.6 operator<=
432 - 21.3.7.7 operator>=
432 - 21.3.7.8 swap
432 - 21.3.7.9 Inserters and extractors
433 - 21.4 Null terminated sequence utilities
437 - 22 Localization library
437 - 22.1 Locales
438 - 22.1.1 Class locale
440 - 22.1.1.1 locale types
440 - 22.1.1.1.1 Type locale::category
442 - 22.1.1.1.2 Class locale::facet
442 - 22.1.1.1.3 Class locale::id
443 - 22.1.1.2 locale constructors and destructor
444 - 22.1.1.3 locale members
444 - 22.1.1.4 locale operators
444 - 22.1.1.5 locale static members
445 - 22.1.2 locale globals
445 - 22.1.3 Convenience interfaces
445 - 22.1.3.1 Character classification
445 - 22.1.3.2 Character conversions
446 - 22.2 Standard locale categories
446 - 22.2.1 The ctype category
446 - 22.2.1.1 Template class ctype
447 - 22.2.1.1.1 ctype members
448 - 22.2.1.1.2 ctype virtual functions
449 - 22.2.1.2 Template class ctype_byname
450 - 22.2.1.3 ctype specializations
451 - 22.2.1.3.1 ctype destructor
451 - 22.2.1.3.2 ctype members
452 - 22.2.1.3.3 ctype static members
452 - 22.2.1.3.4 ctype virtual functions
453 - 22.2.1.4 Class ctype_byname
453 - 22.2.1.5 Template class codecvt
454 - 22.2.1.5.1 codecvt members
455 - 22.2.1.5.2 codecvt virtual functions
457 - 22.2.1.6 Template class codecvt_byname
457 - 22.2.2 The numeric category
457 - 22.2.2.1 Template class num_get
459 - 22.2.2.1.1 num_get members
459 - 22.2.2.1.2 num_get virtual functions
461 - 22.2.2.2 Template class num_put
462 - 22.2.2.2.1 num_put members
462 - 22.2.2.2.2 num_put virtual functions
465 - 22.2.3 The numeric punctuation facet
465 - 22.2.3.1 Template class numpunct
466 - 22.2.3.1.1 numpunct members
467 - 22.2.3.1.2 numpunct virtual functions
467 - 22.2.3.2 Template class numpunct_byname
467 - 22.2.4 The collate category
467 - 22.2.4.1 Template class collate
468 - 22.2.4.1.1 collate members
468 - 22.2.4.1.2 collate virtual functions
469 - 22.2.4.2 Template class collate_byname
469 - 22.2.5 The time category
469 - 22.2.5.1 Template class time_get
470 - 22.2.5.1.1 time_get members
471 - 22.2.5.1.2 time_get virtual functions
472 - 22.2.5.2 Template class time_get_byname
472 - 22.2.5.3 Template class time_put
473 - 22.2.5.3.1 time_put members
473 - 22.2.5.3.2 time_put virtual functions
473 - 22.2.5.4 Template class time_put_byname
474 - 22.2.6 The monetary category
474 - 22.2.6.1 Template class money_get
474 - 22.2.6.1.1 money_get members
474 - 22.2.6.1.2 money_get virtual functions
476 - 22.2.6.2 Template class money_put
476 - 22.2.6.2.1 money_put members
476 - 22.2.6.2.2 money_put virtual functions
477 - 22.2.6.3 Template class moneypunct
478 - 22.2.6.3.1 moneypunct members
478 - 22.2.6.3.2 moneypunct virtual functions
479 - 22.2.6.4 Template class moneypunct_byname
480 - 22.2.7 The message retrieval category
480 - 22.2.7.1 Template class messages
480 - 22.2.7.1.1 messages members
481 - 22.2.7.1.2 messages virtual functions
481 - 22.2.7.2 Template class messages_byname
481 - 22.2.8 Program defined facets
485 - 22.3 C Library Locales
487 - 23 Containers library
487 - 23.1 Container requirements
490 - 23.1.1 Sequences
492 - 23.1.2 Associative containers
495 - 23.2 Sequences
498 - 23.2.1 Template class deque
500 - 23.2.1.1 deque constructors, copy, and assignment
501 - 23.2.1.2 deque capacity
501 - 23.2.1.3 deque modifiers
501 - 23.2.1.4 deque specialized algorithms
502 - 23.2.2 Template class list
504 - 23.2.2.1 list constructors, copy, and assignment
505 - 23.2.2.2 list capacity
505 - 23.2.2.3 list modifiers
505 - 23.2.2.4 list operations
507 - 23.2.2.5 list specialized algorithms
507 - 23.2.3 Container adaptors
507 - 23.2.3.1 Template class queue
508 - 23.2.3.2 Template class priority_queue
509 - 23.2.3.2.1 priority_queue constructors
509 - 23.2.3.2.2 priority_queue members
509 - 23.2.3.3 Template class stack
510 - 23.2.4 Template class vector
512 - 23.2.4.1 vector constructors, copy, and assignment
513 - 23.2.4.2 vector capacity
513 - 23.2.4.3 vector modifiers
514 - 23.2.4.4 vector specialized algorithms
514 - 23.2.5 Class vector
516 - 23.3 Associative containers
518 - 23.3.1 Template class map
520 - 23.3.1.1 map constructors, copy, and assignment
521 - 23.3.1.2 map element access
521 - 23.3.1.3 map operations
521 - 23.3.1.4 map specialized algorithms
521 - 23.3.2 Template class multimap
524 - 23.3.2.1 multimap constructors
524 - 23.3.2.2 multimap operations
524 - 23.3.2.3 multimap specialized algorithms
524 - 23.3.3 Template class set
526 - 23.3.3.1 set constructors, copy, and assignment
527 - 23.3.3.2 set specialized algorithms
527 - 23.3.4 Template class multiset
529 - 23.3.4.1 multiset constructors
529 - 23.3.4.2 multiset specialized algorithms
530 - 23.3.5 Template class bitset
531 - 23.3.5.1 bitset constructors
532 - 23.3.5.2 bitset members
534 - 23.3.5.3 bitset operators
537 - 24 Iterators library
537 - 24.1 Iterator requirements
538 - 24.1.1 Input iterators
539 - 24.1.2 Output iterators
540 - 24.1.3 Forward iterators
541 - 24.1.4 Bidirectional iterators
541 - 24.1.5 Random access iterators
542 - 24.2 Header synopsis
544 - 24.3 Iterator primitives
544 - 24.3.1 Iterator traits
545 - 24.3.2 Basic iterator
546 - 24.3.3 Standard iterator tags
547 - 24.3.4 Iterator operations
547 - 24.4 Predefined iterators
547 - 24.4.1 Reverse iterators
549 - 24.4.1.2 reverse_iterator requirements
549 - 24.4.1.3 reverse_iterator operations
549 - 24.4.1.3.1 reverse_iterator constructor
549 - 24.4.1.3.2 Conversion
549 - 24.4.1.3.3 operator*
550 - 24.4.1.3.4 operator >
550 - 24.4.1.3.5 operator++
550 - 24.4.1.3.6 operator
550 - 24.4.1.3.7 operator+
550 - 24.4.1.3.8 operator+=
551 - 24.4.1.3.9 operator
551 - 24.4.1.3.10 operator =
551 - 24.4.1.3.11 operator[]
551 - 24.4.1.3.12 operator==
551 - 24.4.1.3.13 operator<
551 - 24.4.1.3.14 operator!=
551 - 24.4.1.3.15 operator>
552 - 24.4.1.3.16 operator>=
552 - 24.4.1.3.17 operator<=
552 - 24.4.1.3.18 operator
552 - 24.4.1.3.19 operator+
552 - 24.4.2 Insert iterators
553 - 24.4.2.1 Template class back_insert_iterator
553 - 24.4.2.2 back_insert_iterator operations
553 - 24.4.2.2.1 back_insert_iterator constructor
553 - 24.4.2.2.2 back_insert_iterator::operator=
553 - 24.4.2.2.3 back_insert_iterator::operator*
553 - 24.4.2.2.4 back_insert_iterator::operator++
554 - 24.4.2.2.5 back_inserter
554 - 24.4.2.3 Template class front_insert_iterator
554 - 24.4.2.4 front_insert_iterator operations
554 - 24.4.2.4.1 front_insert_iterator constructor
554 - 24.4.2.4.2 front_insert_iterator::operator=
554 - 24.4.2.4.3 front_insert_iterator::operator*
555 - 24.4.2.4.4 front_insert_iterator::operator++
555 - 24.4.2.4.5 front_inserter
555 - 24.4.2.5 Template class insert_iterator
555 - 24.4.2.6 insert_iterator operations
555 - 24.4.2.6.1 insert_iterator constructor
555 - 24.4.2.6.2 insert_iterator::operator=
556 - 24.4.2.6.3 insert_iterator::operator*
556 - 24.4.2.6.4 insert_iterator::operator++
556 - 24.4.2.6.5 inserter
556 - 24.5 Stream iterators
556 - 24.5.1 Template class istream_iterator
557 - 24.5.1.1 istream_iterator constructors and destructor
557 - 24.5.1.2 istream_iterator operations
558 - 24.5.2 Template class ostream_iterator
559 - 24.5.2.1 ostream_iterator constructors and destructor
559 - 24.5.2.2 ostream_iterator operations
559 - 24.5.3 Template class istreambuf_iterator
560 - 24.5.3.1 Template class istreambuf_iterator::proxy
561 - 24.5.3.2 istreambuf_iterator constructors
561 - 24.5.3.3 istreambuf_iterator::operator*
561 - 24.5.3.4 istreambuf_iterator::operator++
561 - 24.5.3.5 istreambuf_iterator::equal
561 - 24.5.3.6 operator==
562 - 24.5.3.7 operator!=
562 - 24.5.4 Template class ostreambuf_iterator
562 - 24.5.4.1 ostreambuf_iterator constructors
562 - 24.5.4.2 ostreambuf_iterator operations
565 - 25 Algorithms library
573 - 25.1 Non modifying sequence operations
573 - 25.1.1 For each
574 - 25.1.2 Find
574 - 25.1.3 Find End
574 - 25.1.4 Find First
575 - 25.1.5 Adjacent find
575 - 25.1.6 Count
575 - 25.1.7 Mismatch
576 - 25.1.8 Equal
576 - 25.1.9 Search
577 - 25.2 Mutating sequence operations
577 - 25.2.1 Copy
577 - 25.2.2 Swap
578 - 25.2.3 Transform
578 - 25.2.4 Replace
579 - 25.2.5 Fill
579 - 25.2.6 Generate
579 - 25.2.7 Remove
580 - 25.2.8 Unique
580 - 25.2.9 Reverse
581 - 25.2.10 Rotate
581 - 25.2.11 Random shuffle
582 - 25.2.12 Partitions
582 - 25.3 Sorting and related operations
583 - 25.3.1 Sorting
583 - 25.3.1.1 sort
583 - 25.3.1.2 stable_sort
583 - 25.3.1.3 partial_sort
584 - 25.3.1.4 partial_sort_copy
584 - 25.3.2 Nth element
584 - 25.3.3 Binary search
584 - 25.3.3.1 lower_bound
585 - 25.3.3.2 upper_bound
585 - 25.3.3.3 equal_range
585 - 25.3.3.4 binary_search
586 - 25.3.4 Merge
586 - 25.3.5 Set operations on sorted structures
587 - 25.3.5.1 includes
587 - 25.3.5.2 set_union
587 - 25.3.5.3 set_intersection
588 - 25.3.5.4 set_difference
588 - 25.3.5.5 set_symmetric_difference
588 - 25.3.6 Heap operations
589 - 25.3.6.1 push_heap
589 - 25.3.6.2 pop_heap
589 - 25.3.6.3 make_heap
589 - 25.3.6.4 sort_heap
590 - 25.3.7 Minimum and maximum
590 - 25.3.8 Lexicographical comparison
591 - 25.3.9 Permutation generators
591 - 25.4 C library algorithms
593 - 26 Numerics library
593 - 26.1 Numeric type requirements
594 - 26.2 Complex numbers
594 - 26.2.1 Header synopsis
595 - 26.2.2 Template class complex
597 - 26.2.3 complex specializations
598 - 26.2.4 complex member functions
598 - 26.2.5 complex member operators
599 - 26.2.6 complex non member operations
600 - 26.2.7 complex value operations
601 - 26.2.8 complex transcendentals
602 - 26.3 Numeric arrays
602 - 26.3.1 Header synopsis
605 - 26.3.2 Template class valarray
606 - 26.3.2.1 valarray constructors
607 - 26.3.2.2 valarray assignment
608 - 26.3.2.3 valarray element access
608 - 26.3.2.4 valarray subset operations
608 - 26.3.2.5 valarray unary operators
609 - 26.3.2.6 valarray computed assignment
609 - 26.3.2.7 valarray member functions
611 - 26.3.3 valarray non member operations
611 - 26.3.3.1 valarray binary operators
612 - 26.3.3.2 valarray logical operators
613 - 26.3.4 Class slice
613 - 26.3.4.1 slice constructors
614 - 26.3.4.2 slice access functions
614 - 26.3.5 Template class slice_array
615 - 26.3.5.1 slice_array constructors
615 - 26.3.5.2 slice_array assignment
615 - 26.3.5.3 slice_array computed assignment
615 - 26.3.5.4 slice_array fill function
615 - 26.3.6 The gslice class
616 - 26.3.6.1 gslice constructors
617 - 26.3.6.2 gslice access functions
617 - 26.3.7 Template class gslice_array
617 - 26.3.7.1 gslice_array constructors
618 - 26.3.7.2 gslice_array assignment
618 - 26.3.7.3 gslice_array computed assignment
618 - 26.3.7.4 gslice_array fill function
618 - 26.3.8 Template class mask_array
619 - 26.3.8.1 mask_array constructors
619 - 26.3.8.2 mask_array assignment
619 - 26.3.8.3 mask_array computed assignment
620 - 26.3.8.4 mask_array fill function
620 - 26.3.9 Template class indirect_array
620 - 26.3.9.1 indirect_array constructors
621 - 26.3.9.2 indirect_array assignment
621 - 26.3.9.3 indirect_array computed assignment
621 - 26.3.9.4 indirect_array fill function
621 - 26.4 Generalized numeric operations
622 - 26.4.1 Accumulate
623 - 26.4.2 Inner product
623 - 26.4.3 Partial sum
623 - 26.4.4 Adjacent difference
624 - 26.5 C Library
627 - 27 Input/output library
627 - 27.1 Iostreams requirements
627 - 27.1.1 Imbue Limitations
627 - 27.1.2 Positioning Type Limitations
627 - 27.2 Forward declarations
630 - 27.3 Standard iostream objects
630 - 27.3.1 Narrow stream objects
631 - 27.3.2 Wide stream objects
632 - 27.4 Iostreams base classes
632 - 27.4.1 Types
633 - 27.4.2 Class ios_base
635 - 27.4.2.1 Types
635 - 27.4.2.1.1 Class ios_base::failure
635 - 27.4.2.1.2 Type ios_base::fmtflags
636 - 27.4.2.1.3 Type ios_base::iostate
637 - 27.4.2.1.4 Type ios_base::openmode
637 - 27.4.2.1.5 Type ios_base::seekdir
637 - 27.4.2.1.6 Class ios_base::Init
638 - 27.4.2.2 ios_base fmtflags state functions
639 - 27.4.2.3 ios_base locale functions
639 - 27.4.2.4 ios_base static members
639 - 27.4.2.5 ios_base storage functions
640 - 27.4.2.6 ios_base callbacks
640 - 27.4.2.7 ios_base constructors/destructors
640 - 27.4.3 Template class fpos
640 - 27.4.3.1 fpos Members
640 - 27.4.3.2 fpos requirements
641 - 27.4.4 Template class basic_ios
642 - 27.4.4.1 basic_ios constructors
643 - 27.4.4.2 Member functions
644 - 27.4.4.3 basic_ios iostate flags functions
645 - 27.4.5 ios_base manipulators
645 - 27.4.5.1 fmtflags manipulators
646 - 27.4.5.2 adjustfield manipulators
647 - 27.4.5.3 basefield manipulators
647 - 27.4.5.4 floatfield manipulators
647 - 27.5 Stream buffers
648 - 27.5.1 Stream buffer requirements
648 - 27.5.2 Template class basic_streambuf
650 - 27.5.2.1 basic_streambuf constructors
651 - 27.5.2.2 basic_streambuf public member functions
651 - 27.5.2.2.1 Locales
651 - 27.5.2.2.2 Buffer management and positioning
651 - 27.5.2.2.3 Get area
652 - 27.5.2.2.4 Putback
652 - 27.5.2.2.5 Put area
652 - 27.5.2.3 basic_streambuf protected member functions
652 - 27.5.2.3.1 Get area access
653 - 27.5.2.3.2 Put area access
653 - 27.5.2.4 basic_streambuf virtual functions
653 - 27.5.2.4.1 Locales
653 - 27.5.2.4.2 Buffer management and positioning
654 - 27.5.2.4.3 Get area
655 - 27.5.2.4.4 Putback
656 - 27.5.2.4.5 Put area
657 - 27.6 Formatting and manipulators
658 - 27.6.1 Input streams
658 - 27.6.1.1 Template class basic_istream
660 - 27.6.1.1.1 basic_istream constructors
660 - 27.6.1.1.2 Class basic_istream::sentry
661 - 27.6.1.2 Formatted input functions
661 - 27.6.1.2.1 Common requirements
661 - 27.6.1.2.2 Arithmetic Extractors
662 - 27.6.1.2.3 basic_istream::operator>>
663 - 27.6.1.3 Unformatted input functions
667 - 27.6.1.4 Standard basic_istream manipulators
667 - 27.6.1.5 Template class basic_iostream
668 - 27.6.1.5.1 basic_iostream constructors
668 - 27.6.1.5.2 basic_iostream destructor
668 - 27.6.2 Output streams
668 - 27.6.2.1 Template class basic_ostream
670 - 27.6.2.2 basic_ostream constructors
670 - 27.6.2.3 Class basic_ostream::sentry
671 - 27.6.2.4 basic_ostream seek members
671 - 27.6.2.5 Formatted output functions
671 - 27.6.2.5.1 Common requirements
671 - 27.6.2.5.2 Arithmetic Inserters
672 - 27.6.2.5.3 basic_ostream::operator<<
673 - 27.6.2.5.4 Character inserter template functions
673 - 27.6.2.6 Unformatted output functions
674 - 27.6.2.7 Standard basic_ostream manipulators
674 - 27.6.3 Standard manipulators
676 - 27.7 String based streams
677 - 27.7.1 Template class basic_stringbuf
678 - 27.7.1.1 basic_stringbuf constructors
678 - 27.7.1.2 Member functions
679 - 27.7.1.3 Overridden virtual functions
681 - 27.7.2 Template class basic_istringstream
681 - 27.7.2.1 basic_istringstream constructors
682 - 27.7.2.2 Member functions
682 - 27.7.3 Class basic_ostringstream
683 - 27.7.3.1 basic_ostringstream constructors
683 - 27.7.3.2 Member functions
683 - 27.7.4 Template class basic_stringstream
684 - 27.7.5 basic_stringstream constructors
684 - 27.7.6 Member functions
685 - 27.8 File based streams
685 - 27.8.1 File streams
685 - 27.8.1.1 Template class basic_filebuf
686 - 27.8.1.2 basic_filebuf constructors
687 - 27.8.1.3 Member functions
688 - 27.8.1.4 Overridden virtual functions
690 - 27.8.1.5 Template class basic_ifstream
691 - 27.8.1.6 basic_ifstream constructors
691 - 27.8.1.7 Member functions
692 - 27.8.1.8 Template class basic_ofstream
692 - 27.8.1.9 basic_ofstream constructors
693 - 27.8.1.10 Member functions
693 - 27.8.1.11 Template class basic_fstream
694 - 27.8.1.12 basic_fstream constructors
694 - 27.8.1.13 Member functions
694 - 27.8.2 C Library files
695 - Annex A Grammar summary
695 - A.1 Keywords
695 - A.2 Lexical conventions
699 - A.3 Basic concepts
699 - A.4 Expressions
702 - A.5 Statements
703 - A.6 Declarations
705 - A.7 Declarators
707 - A.8 Classes
708 - A.9 Derived classes
708 - A.10 Special member functions
708 - A.11 Overloading
709 - A.12 Templates
709 - A.13 Exception handling
710 - A.14 Preprocessing directives
713 - Annex B Implementation quantities
715 - Annex C Compatibility
715 - C.1 C++ and ISO C
715 - C.1.1 Clause 2: lexical conventions
716 - C.1.2 Clause 3: basic concepts
718 - C.1.3 Clause 5: expressions
718 - C.1.4 Clause 6: statements
719 - C.1.5 Clause 7: declarations
721 - C.1.6 Clause 8: declarators
722 - C.1.7 Clause 9: classes
723 - C.1.8 Clause 12: special member functions
724 - C.1.9 Clause 16: preprocessing directives
724 - C.2 Standard C library
726 - C.2.1 Modifications to headers
726 - C.2.2 Modifications to definitions
726 - C.2.2.1 Type wchar_t
727 - C.2.2.2 Header
727 - C.2.2.3 Macro NULL
727 - C.2.3 Modifications to declarations
727 - C.2.4 Modifications to behavior
727 - C.2.4.1 Macro offsetof( type, member designator)
727 - C.2.4.2 Memory allocation functions
729 - Annex D Compatibility features
729 - D.1 Postfix increment operator
729 - D.2 static keyword
729 - D.3 Access declarations
729 - D.4 Implicit conversion from const strings
729 - D.5 Standard C library headers
729 - D.6 Old iostreams members
731 - D.7 char* streams
731 - D.7.1 Class strstreambuf
733 - D.7.1.1 strstreambuf constructors
734 - D.7.1.2 Member functions
734 - D.7.1.3 strstreambuf overridden virtual functions
737 - D.7.2 Class istrstream
737 - D.7.2.1 istrstream constructors
737 - D.7.2.2 Member functions
738 - D.7.3 Class ostrstream
738 - D.7.3.1 ostrstream constructors
738 - D.7.3.2 Member functions
739 - D.7.4 Class strstream
739 - D.7.4.1 strstream constructors
740 - D.7.4.2 strstream destructor
740 - D.7.4.3 strstream operations
741 - Annex E Universal character names
743 - Index