Contents
List of Tables
List of Figures
1 Scope
2 Normative references
3 Terms and definitions
4 General principles
4.1 Implementation compliance
4.2 Structure of this document
4.3 Syntax notation
4.4 The C++ memory model
4.5 The C++ object model
4.6 Program execution
4.7 Multi-threaded executions and data races
4.7.1 Data races
4.7.2 Forward progress
4.8 Acknowledgments
5 Lexical conventions
5.1 Separate translation
5.2 Phases of translation
5.3 Character sets
5.4 Preprocessing tokens
5.5 Alternative tokens
5.6 Tokens
5.7 Comments
5.8 Header names
5.9 Preprocessing numbers
5.10 Identifiers
5.11 Keywords
5.12 Operators and punctuators
5.13 Literals
5.13.1 Kinds of literals
5.13.2 Integer literals
5.13.3 Character literals
5.13.4 Floating literals
5.13.5 String literals
5.13.6 Boolean literals
5.13.7 Pointer literals
5.13.8 User-defined literals
6 Basic concepts
6.1 Declarations and definitions
6.2 One-definition rule
6.3 Scope
6.3.1 Declarative regions and scopes
6.3.2 Point of declaration
6.3.3 Block scope
6.3.4 Function prototype scope
6.3.5 Function scope
6.3.6 Namespace scope
6.3.7 Class scope
6.3.8 Enumeration scope
6.3.9 Template parameter scope
6.3.10 Name hiding
6.4 Name lookup
6.4.1 Unqualified name lookup
6.4.2 Argument-dependent name lookup
6.4.3 Qualified name lookup
6.4.3.1 Class members
6.4.3.2 Namespace members
6.4.4 Elaborated type specifiers
6.4.5 Class member access
6.4.6 Using-directives and namespace aliases
6.5 Program and linkage
6.6 Start and termination
6.6.1 main function
6.6.2 Static initialization
6.6.3 Dynamic initialization of non-local variables
6.6.4 Termination
6.7 Storage duration
6.7.1 Static storage duration
6.7.2 Thread storage duration
6.7.3 Automatic storage duration
6.7.4 Dynamic storage duration
6.7.4.1 Allocation functions
6.7.4.2 Deallocation functions
6.7.4.3 Safely-derived pointers
6.7.5 Duration of subobjects
6.8 Object lifetime
6.9 Types
6.9.1 Fundamental types
6.9.2 Compound types
6.9.3 CV-qualifiers
6.10 Lvalues and rvalues
6.11 Alignment
7 Standard conversions
7.1 Lvalue-to-rvalue conversion
7.2 Array-to-pointer conversion
7.3 Function-to-pointer conversion
7.4 Temporary materialization conversion
7.5 Qualification conversions
7.6 Integral promotions
7.7 Floating-point promotion
7.8 Integral conversions
7.9 Floating-point conversions
7.10 Floating-integral conversions
7.11 Pointer conversions
7.12 Pointer to member conversions
7.13 Function pointer conversions
7.14 Boolean conversions
7.15 Integer conversion rank
8 Expressions
8.1 Primary expressions
8.1.1 Literals
8.1.2 This
8.1.3 Parentheses
8.1.4 Names
8.1.4.1 Unqualified names
8.1.4.2 Qualified names
8.1.5 Lambda expressions
8.1.5.1 Closure types
8.1.5.2 Captures
8.1.6 Fold expressions
8.2 Postfix expressions
8.2.1 Subscripting
8.2.2 Function call
8.2.3 Explicit type conversion (functional notation)
8.2.4 Pseudo destructor call
8.2.5 Class member access
8.2.6 Increment and decrement
8.2.7 Dynamic cast
8.2.8 Type identification
8.2.9 Static cast
8.2.10 Reinterpret cast
8.2.11 Const cast
8.3 Unary expressions
8.3.1 Unary operators
8.3.2 Increment and decrement
8.3.3 Sizeof
8.3.4 New
8.3.5 Delete
8.3.6 Alignof
8.3.7 noexcept operator
8.4 Explicit type conversion (cast notation)
8.5 Pointer-to-member operators
8.6 Multiplicative operators
8.7 Additive operators
8.8 Shift operators
8.9 Relational operators
8.10 Equality operators
8.11 Bitwise AND operator
8.12 Bitwise exclusive OR operator
8.13 Bitwise inclusive OR operator
8.14 Logical AND operator
8.15 Logical OR operator
8.16 Conditional operator
8.17 Throwing an exception
8.18 Assignment and compound assignment operators
8.19 Comma operator
8.20 Constant expressions
9 Statements
9.1 Labeled statement
9.2 Expression statement
9.3 Compound statement or block
9.4 Selection statements
9.4.1 The if statement
9.4.2 The switch statement
9.5 Iteration statements
9.5.1 The while statement
9.5.2 The do statement
9.5.3 The for statement
9.5.4 The range-based for statement
9.6 Jump statements
9.6.1 The break statement
9.6.2 The continue statement
9.6.3 The return statement
9.6.4 The goto statement
9.7 Declaration statement
9.8 Ambiguity resolution
10 Declarations
10.1 Specifiers
10.1.1 Storage class specifiers
10.1.2 Function specifiers
10.1.3 The typedef specifier
10.1.4 The friend specifier
10.1.5 The constexpr specifier
10.1.6 The inline specifier
10.1.7 Type specifiers
10.1.7.1 The cv-qualifiers
10.1.7.2 Simple type specifiers
10.1.7.3 Elaborated type specifiers
10.1.7.4 The auto specifier
10.1.7.4.1 Placeholder type deduction
10.1.7.5 Deduced class template specialization types
10.2 Enumeration declarations
10.3 Namespaces
10.3.1 Namespace definition
10.3.1.1 Unnamed namespaces
10.3.1.2 Namespace member definitions
10.3.2 Namespace alias
10.3.3 The using declaration
10.3.4 Using directive
10.4 The asm declaration
10.5 Linkage specifications
10.6 Attributes
10.6.1 Attribute syntax and semantics
10.6.2 Alignment specifier
10.6.3 Carries dependency attribute
10.6.4 Deprecated attribute
10.6.5 Fallthrough attribute
10.6.6 Maybe unused attribute
10.6.7 Nodiscard attribute
10.6.8 Noreturn attribute
11 Declarators
11.1 Type names
11.2 Ambiguity resolution
11.3 Meaning of declarators
11.3.1 Pointers
11.3.2 References
11.3.3 Pointers to members
11.3.4 Arrays
11.3.5 Functions
11.3.6 Default arguments
11.4 Function definitions
11.4.1 In general
11.4.2 Explicitly-defaulted functions
11.4.3 Deleted definitions
11.5 Structured binding declarations
11.6 Initializers
11.6.1 Aggregates
11.6.2 Character arrays
11.6.3 References
11.6.4 List-initialization
12 Classes
12.1 Class names
12.2 Class members
12.2.1 Member functions
12.2.2 Non-static member functions
12.2.2.1 The this pointer
12.2.3 Static members
12.2.3.1 Static member functions
12.2.3.2 Static data members
12.2.4 Bit-fields
12.2.5 Nested class declarations
12.2.6 Nested type names
12.3 Unions
12.3.1 Anonymous unions
12.4 Local class declarations
13 Derived classes
13.1 Multiple base classes
13.2 Member name lookup
13.3 Virtual functions
13.4 Abstract classes
14 Member access control
14.1 Access specifiers
14.2 Accessibility of base classes and base class members
14.3 Friends
14.4 Protected member access
14.5 Access to virtual functions
14.6 Multiple access
14.7 Nested classes
15 Special member functions
15.1 Constructors
15.2 Temporary objects
15.3 Conversions
15.3.1 Conversion by constructor
15.3.2 Conversion functions
15.4 Destructors
15.5 Free store
15.6 Initialization
15.6.1 Explicit initialization
15.6.2 Initializing bases and members
15.6.3 Initialization by inherited constructor
15.7 Construction and destruction
15.8 Copying and moving class objects
15.8.1 Copy/move constructors
15.8.2 Copy/move assignment operator
15.8.3 Copy/move elision
16 Overloading
16.1 Overloadable declarations
16.2 Declaration matching
16.3 Overload resolution
16.3.1 Candidate functions and argument lists
16.3.1.1 Function call syntax
16.3.1.1.1 Call to named function
16.3.1.1.2 Call to object of class type
16.3.1.2 Operators in expressions
16.3.1.3 Initialization by constructor
16.3.1.4 Copy-initialization of class by user-defined conversion
16.3.1.5 Initialization by conversion function
16.3.1.6 Initialization by conversion function for direct reference binding
16.3.1.7 Initialization by list-initialization
16.3.1.8 Class template argument deduction
16.3.2 Viable functions
16.3.3 Best viable function
16.3.3.1 Implicit conversion sequences
16.3.3.1.1 Standard conversion sequences
16.3.3.1.2 User-defined conversion sequences
16.3.3.1.3 Ellipsis conversion sequences
16.3.3.1.4 Reference binding
16.3.3.1.5 List-initialization sequence
16.3.3.2 Ranking implicit conversion sequences
16.4 Address of overloaded function
16.5 Overloaded operators
16.5.1 Unary operators
16.5.2 Binary operators
16.5.3 Assignment
16.5.4 Function call
16.5.5 Subscripting
16.5.6 Class member access
16.5.7 Increment and decrement
16.5.8 User-defined literals
16.6 Built-in operators
17 Templates
17.1 Template parameters
17.2 Names of template specializations
17.3 Template arguments
17.3.1 Template type arguments
17.3.2 Template non-type arguments
17.3.3 Template template arguments
17.4 Type equivalence
17.5 Template declarations
17.5.1 Class templates
17.5.1.1 Member functions of class templates
17.5.1.2 Member classes of class templates
17.5.1.3 Static data members of class templates
17.5.1.4 Enumeration members of class templates
17.5.2 Member templates
17.5.3 Variadic templates
17.5.4 Friends
17.5.5 Class template partial specializations
17.5.5.1 Matching of class template partial specializations
17.5.5.2 Partial ordering of class template specializations
17.5.5.3 Members of class template specializations
17.5.6 Function templates
17.5.6.1 Function template overloading
17.5.6.2 Partial ordering of function templates
17.5.7 Alias templates
17.6 Name resolution
17.6.1 Locally declared names
17.6.2 Dependent names
17.6.2.1 Dependent types
17.6.2.2 Type-dependent expressions
17.6.2.3 Value-dependent expressions
17.6.2.4 Dependent template arguments
17.6.3 Non-dependent names
17.6.4 Dependent name resolution
17.6.4.1 Point of instantiation
17.6.4.2 Candidate functions
17.6.5 Friend names declared within a class template
17.7 Template instantiation and specialization
17.7.1 Implicit instantiation
17.7.2 Explicit instantiation
17.7.3 Explicit specialization
17.8 Function template specializations
17.8.1 Explicit template argument specification
17.8.2 Template argument deduction
17.8.2.1 Deducing template arguments from a function call
17.8.2.2 Deducing template arguments taking the address of a function template
17.8.2.3 Deducing conversion function template arguments
17.8.2.4 Deducing template arguments during partial ordering
17.8.2.5 Deducing template arguments from a type
17.8.2.6 Deducing template arguments from a function declaration
17.8.3 Overload resolution
17.9 Deduction guides
18 Exception handling
18.1 Throwing an exception
18.2 Constructors and destructors
18.3 Handling an exception
18.4 Exception specifications
18.5 Special functions
18.5.1 The std::terminate() function
18.5.2 The std::uncaught_exceptions() function
19 Preprocessing directives
19.1 Conditional inclusion
19.2 Source file inclusion
19.3 Macro replacement
19.3.1 Argument substitution
19.3.2 The # operator
19.3.3 The ## operator
19.3.4 Rescanning and further replacement
19.3.5 Scope of macro definitions
19.4 Line control
19.5 Error directive
19.6 Pragma directive
19.7 Null directive
19.8 Predefined macro names
19.9 Pragma operator
20 Library introduction
20.1 General
20.2 The C standard library
20.3 Definitions
20.4 Method of description (Informative)
20.4.1 Structure of each clause
20.4.1.1 Elements
20.4.1.2 Summary
20.4.1.3 Requirements
20.4.1.4 Detailed specifications
20.4.1.5 C library
20.4.2 Other conventions
20.4.2.1 Type descriptions
20.4.2.1.1 General
20.4.2.1.2 Exposition-only types
20.4.2.1.3 Enumerated types
20.4.2.1.4 Bitmask types
20.4.2.1.5 Character sequences
20.4.2.1.5.1 Byte strings
20.4.2.1.5.2 Multibyte strings
20.4.2.2 Functions within classes
20.4.2.3 Private members
20.5 Library-wide requirements
20.5.1 Library contents and organization
20.5.1.1 Library contents
20.5.1.2 Headers
20.5.1.3 Freestanding implementations
20.5.2 Using the library
20.5.2.1 Overview
20.5.2.2 Headers
20.5.2.3 Linkage
20.5.3 Requirements on types and expressions
20.5.3.1 Template argument requirements
20.5.3.2 Swappable requirements
20.5.3.3 NullablePointer requirements
20.5.3.4 Hash requirements
20.5.3.5 Allocator requirements
20.5.3.5.1 Allocator completeness requirements
20.5.4 Constraints on programs
20.5.4.1 Overview
20.5.4.2 Namespace use
20.5.4.2.1 Namespace std
20.5.4.2.2 Namespace posix
20.5.4.2.3 Namespaces for future standardization
20.5.4.3 Reserved names
20.5.4.3.1 Zombie names
20.5.4.3.2 Macro names
20.5.4.3.3 External linkage
20.5.4.3.4 Types
20.5.4.3.5 User-defined literal suffixes
20.5.4.4 Headers
20.5.4.5 Derived classes
20.5.4.6 Replacement functions
20.5.4.7 Handler functions
20.5.4.8 Other functions
20.5.4.9 Function arguments
20.5.4.10 Library object access
20.5.4.11 Requires paragraph
20.5.5 Conforming implementations
20.5.5.1 Overview
20.5.5.2 Headers
20.5.5.3 Restrictions on macro definitions
20.5.5.4 Non-member functions
20.5.5.5 Member functions
20.5.5.6 Constexpr functions and constructors
20.5.5.7 Requirements for stable algorithms
20.5.5.8 Reentrancy
20.5.5.9 Data race avoidance
20.5.5.10 Protection within classes
20.5.5.11 Derived classes
20.5.5.12 Restrictions on exception handling
20.5.5.13 Restrictions on storage of pointers
20.5.5.14 Value of error codes
20.5.5.15 Moved-from state of library types
21 Language support library
21.1 General
21.2 Common definitions
21.2.1 Header synopsis
21.2.2 Header synopsis
21.2.3 Null pointers
21.2.4 Sizes, alignments, and offsets
21.2.5 byte type operations
21.3 Implementation properties
21.3.1 General
21.3.2 Header synopsis
21.3.3 Floating-point type properties
21.3.3.1 Type float_round_style
21.3.3.2 Type float_denorm_style
21.3.4 Class template numeric_limits
21.3.4.1 numeric_limits members
21.3.4.2 numeric_limits specializations
21.3.5 Header synopsis
21.3.6 Header synopsis
21.4 Integer types
21.4.1 Header synopsis
21.5 Start and termination
21.6 Dynamic memory management
21.6.1 Header synopsis
21.6.2 Storage allocation and deallocation
21.6.2.1 Single-object forms
21.6.2.2 Array forms
21.6.2.3 Non-allocating forms
21.6.2.4 Data races
21.6.3 Storage allocation errors
21.6.3.1 Class bad_alloc
21.6.3.2 Class bad_array_new_length
21.6.3.3 Type new_handler
21.6.3.4 set_new_handler
21.6.3.5 get_new_handler
21.6.4 Pointer optimization barrier
21.6.5 Hardware interference size
21.7 Type identification
21.7.1 Header synopsis
21.7.2 Class type_info
21.7.3 Class bad_cast
21.7.4 Class bad_typeid
21.8 Exception handling
21.8.1 Header synopsis
21.8.2 Class exception
21.8.3 Class bad_exception
21.8.4 Abnormal termination
21.8.4.1 Type terminate_handler
21.8.4.2 set_terminate
21.8.4.3 get_terminate
21.8.4.4 terminate
21.8.5 uncaught_exceptions
21.8.6 Exception propagation
21.8.7 nested_exception
21.9 Initializer lists
21.9.1 Header synopsis
21.9.2 Initializer list constructors
21.9.3 Initializer list access
21.9.4 Initializer list range access
21.10 Other runtime support
21.10.1 Header synopsis
21.10.2 Header synopsis
21.10.3 Header synopsis
21.10.4 Signal handlers
22 Diagnostics library
22.1 General
22.2 Exception classes
22.2.1 Header synopsis
22.2.2 Class logic_error
22.2.3 Class domain_error
22.2.4 Class invalid_argument
22.2.5 Class length_error
22.2.6 Class out_of_range
22.2.7 Class runtime_error
22.2.8 Class range_error
22.2.9 Class overflow_error
22.2.10 Class underflow_error
22.3 Assertions
22.3.1 Header synopsis
22.3.2 The assert macro
22.4 Error numbers
22.4.1 Header synopsis
22.5 System error support
22.5.1 Header synopsis
22.5.2 Class error_category
22.5.2.1 Class error_category overview
22.5.2.2 Class error_category virtual members
22.5.2.3 Class error_category non-virtual members
22.5.2.4 Program defined classes derived from error_category
22.5.2.5 Error category objects
22.5.3 Class error_code
22.5.3.1 Class error_code overview
22.5.3.2 Class error_code constructors
22.5.3.3 Class error_code modifiers
22.5.3.4 Class error_code observers
22.5.3.5 Class error_code non-member functions
22.5.4 Class error_condition
22.5.4.1 Class error_condition overview
22.5.4.2 Class error_condition constructors
22.5.4.3 Class error_condition modifiers
22.5.4.4 Class error_condition observers
22.5.4.5 Class error_condition non-member functions
22.5.5 Comparison functions
22.5.6 System error hash support
22.5.7 Class system_error
22.5.7.1 Class system_error overview
22.5.7.2 Class system_error members
23 General utilities library
23.1 General
23.2 Utility components
23.2.1 Header synopsis
23.2.2 Operators
23.2.3 swap
23.2.4 exchange
23.2.5 Forward/move helpers
23.2.6 Function template as_const
23.2.7 Function template declval
23.2.8 Primitive numeric output conversion
23.2.9 Primitive numeric input conversion
23.3 Compile-time integer sequences
23.3.1 In general
23.3.2 Class template integer_sequence
23.3.3 Alias template make_integer_sequence
23.4 Pairs
23.4.1 In general
23.4.2 Class template pair
23.4.3 Specialized algorithms
23.4.4 Tuple-like access to pair
23.4.5 Piecewise construction
23.5 Tuples
23.5.1 In general
23.5.2 Header synopsis
23.5.3 Class template tuple
23.5.3.1 Construction
23.5.3.2 Assignment
23.5.3.3 swap
23.5.3.4 Tuple creation functions
23.5.3.5 Calling a function with a tuple of arguments
23.5.3.6 Tuple helper classes
23.5.3.7 Element access
23.5.3.8 Relational operators
23.5.3.9 Tuple traits
23.5.3.10 Tuple specialized algorithms
23.6 Optional objects
23.6.1 In general
23.6.2 Header synopsis
23.6.3 Class template optional
23.6.3.1 Constructors
23.6.3.2 Destructor
23.6.3.3 Assignment
23.6.3.4 Swap
23.6.3.5 Observers
23.6.3.6 Modifiers
23.6.4 No-value state indicator
23.6.5 Class bad_optional_access
23.6.6 Relational operators
23.6.7 Comparison with nullopt
23.6.8 Comparison with T
23.6.9 Specialized algorithms
23.6.10 Hash support
23.7 Variants
23.7.1 In general
23.7.2 Header synopsis
23.7.3 Class template variant
23.7.3.1 Constructors
23.7.3.2 Destructor
23.7.3.3 Assignment
23.7.3.4 Modifiers
23.7.3.5 Value status
23.7.3.6 Swap
23.7.4 variant helper classes
23.7.5 Value access
23.7.6 Relational operators
23.7.7 Visitation
23.7.8 Class monostate
23.7.9 monostate relational operators
23.7.10 Specialized algorithms
23.7.11 Class bad_variant_access
23.7.12 Hash support
23.7.13 Allocator-related traits
23.8 Storage for any type
23.8.2 Class bad_any_cast
23.8.3 Class any
23.8.3.1 Construction and destruction
23.8.3.2 Assignment
23.8.3.3 Modifiers
23.8.3.4 Observers
23.8.4 Non-member functions
23.9 Bitsets
23.9.1 Header synopsis
23.9.2 Class template bitset
23.9.2.1 bitset constructors
23.9.2.2 bitset members
23.9.3 bitset hash support
23.9.4 bitset operators
23.10 Memory
23.10.1 In general
23.10.2 Header synopsis
23.10.3 Pointer traits
23.10.3.1 Pointer traits member types
23.10.3.2 Pointer traits member functions
23.10.4 Pointer safety
23.10.5 Align
23.10.6 Allocator argument tag
23.10.7 uses_allocator
23.10.7.1 uses_allocator trait
23.10.7.2 Uses-allocator construction
23.10.8 Allocator traits
23.10.8.1 Allocator traits member types
23.10.8.2 Allocator traits static member functions
23.10.9 The default allocator
23.10.9.1 allocator members
23.10.9.2 allocator globals
23.10.10 Specialized algorithms
23.10.10.1 addressof
23.10.10.2 uninitialized_default_construct
23.10.10.3 uninitialized_value_construct
23.10.10.4 uninitialized_copy
23.10.10.5 uninitialized_move
23.10.10.6 uninitialized_fill
23.10.10.7 destroy
23.10.11 C library memory allocation
23.11 Smart pointers
23.11.1 Class template unique_ptr
23.11.1.1 Default deleters
23.11.1.1.1 In general
23.11.1.1.2 default_delete
23.11.1.1.3 default_delete
23.11.1.2 unique_ptr for single objects
23.11.1.2.1 unique_ptr constructors
23.11.1.2.2 unique_ptr destructor
23.11.1.2.3 unique_ptr assignment
23.11.1.2.4 unique_ptr observers
23.11.1.2.5 unique_ptr modifiers
23.11.1.3 unique_ptr for array objects with a runtime length
23.11.1.3.1 unique_ptr constructors
23.11.1.3.2 unique_ptr assignment
23.11.1.3.3 unique_ptr observers
23.11.1.3.4 unique_ptr modifiers
23.11.1.4 unique_ptr creation
23.11.1.5 unique_ptr specialized algorithms
23.11.2 Shared-ownership pointers
23.11.2.1 Class bad_weak_ptr
23.11.2.2 Class template shared_ptr
23.11.2.2.1 shared_ptr constructors
23.11.2.2.2 shared_ptr destructor
23.11.2.2.3 shared_ptr assignment
23.11.2.2.4 shared_ptr modifiers
23.11.2.2.5 shared_ptr observers
23.11.2.2.6 shared_ptr creation
23.11.2.2.7 shared_ptr comparison
23.11.2.2.8 shared_ptr specialized algorithms
23.11.2.2.9 shared_ptr casts
23.11.2.2.10 get_deleter
23.11.2.2.11 shared_ptr I/O
23.11.2.3 Class template weak_ptr
23.11.2.3.1 weak_ptr constructors
23.11.2.3.2 weak_ptr destructor
23.11.2.3.3 weak_ptr assignment
23.11.2.3.4 weak_ptr modifiers
23.11.2.3.5 weak_ptr observers
23.11.2.3.6 weak_ptr specialized algorithms
23.11.2.4 Class template owner_less
23.11.2.5 Class template enable_shared_from_this
23.11.2.6 shared_ptr atomic access
23.11.2.7 Smart pointer hash support
23.12 Memory resources
23.12.1 Header synopsis
23.12.2 Class memory_resource
23.12.2.1 memory_resource public member functions
23.12.2.2 memory_resource private virtual member functions
23.12.2.3 memory_resource equality
23.12.3 Class template polymorphic_allocator
23.12.3.1 polymorphic_allocator constructors
23.12.3.2 polymorphic_allocator member functions
23.12.3.3 polymorphic_allocator equality
23.12.4 Access to program-wide memory_resource objects
23.12.5 Pool resource classes
23.12.5.1 Classes synchronized_pool_resource and unsynchronized_pool_resource
23.12.5.2 pool_options data members
23.12.5.3 Pool resource constructors and destructors
23.12.5.4 Pool resource members
23.12.6 Class monotonic_buffer_resource
23.12.6.1 monotonic_buffer_resource constructor and destructor
23.12.6.2 monotonic_buffer_resource members
23.13 Class template scoped_allocator_adaptor
23.13.1 Header synopsis
23.13.2 Scoped allocator adaptor member types
23.13.3 Scoped allocator adaptor constructors
23.13.4 Scoped allocator adaptor members
23.13.5 Scoped allocator operators
23.14 Function objects
23.14.1 Header synopsis
23.14.2 Definitions
23.14.3 Requirements
23.14.4 Function template invoke
23.14.5 Class template reference_wrapper
23.14.5.1 reference_wrapper construct/copy/destroy
23.14.5.2 reference_wrapper assignment
23.14.5.3 reference_wrapper access
23.14.5.4 reference_wrapper invocation
23.14.5.5 reference_wrapper helper functions
23.14.6 Arithmetic operations
23.14.6.1 Class template plus
23.14.6.2 Class template minus
23.14.6.3 Class template multiplies
23.14.6.4 Class template divides
23.14.6.5 Class template modulus
23.14.6.6 Class template negate
23.14.7 Comparisons
23.14.7.1 Class template equal_to
23.14.7.2 Class template not_equal_to
23.14.7.3 Class template greater
23.14.7.4 Class template less
23.14.7.5 Class template greater_equal
23.14.7.6 Class template less_equal
23.14.8 Logical operations
23.14.8.1 Class template logical_and
23.14.8.2 Class template logical_or
23.14.8.3 Class template logical_not
23.14.9 Bitwise operations
23.14.9.1 Class template bit_and
23.14.9.2 Class template bit_or
23.14.9.3 Class template bit_xor
23.14.9.4 Class template bit_not
23.14.10 Function template not_fn
23.14.11 Function object binders
23.14.11.1 Class template is_bind_expression
23.14.11.2 Class template is_placeholder
23.14.11.3 Function template bind
23.14.11.4 Placeholders
23.14.12 Function template mem_fn
23.14.13 Polymorphic function wrappers
23.14.13.1 Class bad_function_call
23.14.13.1.1 bad_function_call constructor
23.14.13.2 Class template function
23.14.13.2.1 function construct/copy/destroy
23.14.13.2.2 function modifiers
23.14.13.2.3 function capacity
23.14.13.2.4 function invocation
23.14.13.2.5 function target access
23.14.13.2.6 null pointer comparison functions
23.14.13.2.7 specialized algorithms
23.14.14 Searchers
23.14.14.1 Class template default_searcher
23.14.14.2 Class template boyer_moore_searcher
23.14.14.3 Class template boyer_moore_horspool_searcher
23.14.15 Class template hash
23.15 Metaprogramming and type traits
23.15.1 Requirements
23.15.2 Header synopsis
23.15.3 Helper classes
23.15.4 Unary type traits
23.15.4.1 Primary type categories
23.15.4.2 Composite type traits
23.15.4.3 Type properties
23.15.5 Type property queries
23.15.6 Relationships between types
23.15.7 Transformations between types
23.15.7.1 Const-volatile modifications
23.15.7.2 Reference modifications
23.15.7.3 Sign modifications
23.15.7.4 Array modifications
23.15.7.5 Pointer modifications
23.15.7.6 Other transformations
23.15.8 Logical operator traits
23.16 Compile-time rational arithmetic
23.16.1 In general
23.16.2 Header synopsis
23.16.3 Class template ratio
23.16.4 Arithmetic on ratios
23.16.5 Comparison of ratios
23.16.6 SI types for ratio
23.17 Time utilities
23.17.1 In general
23.17.2 Header synopsis
23.17.3 Clock requirements
23.17.4 Time-related traits
23.17.4.1 treat_as_floating_point
23.17.4.2 duration_values
23.17.4.3 Specializations of common_type
23.17.5 Class template duration
23.17.5.1 duration constructors
23.17.5.2 duration observer
23.17.5.3 duration arithmetic
23.17.5.4 duration special values
23.17.5.5 duration non-member arithmetic
23.17.5.6 duration comparisons
23.17.5.7 duration_cast
23.17.5.8 Suffixes for duration literals
23.17.5.9 duration algorithms
23.17.6 Class template time_point
23.17.6.1 time_point constructors
23.17.6.2 time_point observer
23.17.6.3 time_point arithmetic
23.17.6.4 time_point special values
23.17.6.5 time_point non-member arithmetic
23.17.6.6 time_point comparisons
23.17.6.7 time_point_cast
23.17.7 Clocks
23.17.7.1 Class system_clock
23.17.7.2 Class steady_clock
23.17.7.3 Class high_resolution_clock
23.17.8 Header synopsis
23.18 Class type_index
23.18.1 Header synopsis
23.18.2 type_index overview
23.18.3 type_index members
23.18.4 Hash support
23.19 Execution policies
23.19.1 In general
23.19.2 Header synopsis
23.19.3 Execution policy type trait
23.19.4 Sequenced execution policy
23.19.5 Parallel execution policy
23.19.6 Parallel and unsequenced execution policy
23.19.7 Execution policy objects
24 Strings library
24.1 General
24.2 Character traits
24.2.1 Character traits requirements
24.2.2 Traits typedefs
24.2.3 char_traits specializations
24.2.3.1 struct char_traits
24.2.3.2 struct char_traits
24.2.3.3 struct char_traits
24.2.3.4 struct char_traits
24.3 String classes
24.3.1 Header synopsis
24.3.2 Class template basic_string
24.3.2.1 basic_string general requirements
24.3.2.2 basic_string constructors and assignment operators
24.3.2.3 basic_string iterator support
24.3.2.4 basic_string capacity
24.3.2.5 basic_string element access
24.3.2.6 basic_string modifiers
24.3.2.6.1 basic_string::operator+=
24.3.2.6.2 basic_string::append
24.3.2.6.3 basic_string::assign
24.3.2.6.4 basic_string::insert
24.3.2.6.5 basic_string::erase
24.3.2.6.6 basic_string::replace
24.3.2.6.7 basic_string::copy
24.3.2.6.8 basic_string::swap
24.3.2.7 basic_string string operations
24.3.2.7.1 basic_string accessors
24.3.2.7.2 basic_string::find
24.3.2.7.3 basic_string::rfind
24.3.2.7.4 basic_string::find_first_of
24.3.2.7.5 basic_string::find_last_of
24.3.2.7.6 basic_string::find_first_not_of
24.3.2.7.7 basic_string::find_last_not_of
24.3.2.7.8 basic_string::substr
24.3.2.7.9 basic_string::compare
24.3.3 basic_string non-member functions
24.3.3.1 operator+
24.3.3.2 operator==
24.3.3.3 operator!=
24.3.3.4 operator<
24.3.3.5 operator>
24.3.3.6 operator<=
24.3.3.7 operator>=
24.3.3.8 swap
24.3.3.9 Inserters and extractors
24.3.4 Numeric conversions
24.3.5 Hash support
24.3.6 Suffix for basic_string literals
24.4 String view classes
24.4.1 Header synopsis
24.4.2 Class template basic_string_view
24.4.2.1 Construction and assignment
24.4.2.2 Iterator support
24.4.2.3 Capacity
24.4.2.4 Element access
24.4.2.5 Modifiers
24.4.2.6 String operations
24.4.2.7 Searching
24.4.3 Non-member comparison functions
24.4.4 Inserters and extractors
24.4.5 Hash support
24.4.6 Suffix for basic_string_view literals
24.5 Null-terminated sequence utilities
24.5.1 Header synopsis
24.5.2 Header synopsis
24.5.3 Header synopsis
24.5.4 Header synopsis
24.5.5 Header synopsis
24.5.6 Multibyte / wide string and character conversion functions
25 Localization library
25.1 General
25.2 Header synopsis
25.3 Locales
25.3.1 Class locale
25.3.1.1 locale types
25.3.1.1.1 Type locale::category
25.3.1.1.2 Class locale::facet
25.3.1.1.3 Class locale::id
25.3.1.2 locale constructors and destructor
25.3.1.3 locale members
25.3.1.4 locale operators
25.3.1.5 locale static members
25.3.2 locale globals
25.3.3 Convenience interfaces
25.3.3.1 Character classification
25.3.3.2 Conversions
25.3.3.2.1 Character conversions
25.4 Standard locale categories
25.4.1 The ctype category
25.4.1.1 Class template ctype
25.4.1.1.1 ctype members
25.4.1.1.2 ctype virtual functions
25.4.1.2 Class template ctype_byname
25.4.1.3 ctype specializations
25.4.1.3.1 ctype destructor
25.4.1.3.2 ctype members
25.4.1.3.3 ctype static members
25.4.1.3.4 ctype virtual functions
25.4.1.4 Class template codecvt
25.4.1.4.1 codecvt members
25.4.1.4.2 codecvt virtual functions
25.4.1.5 Class template codecvt_byname
25.4.2 The numeric category
25.4.2.1 Class template num_get
25.4.2.1.1 num_get members
25.4.2.1.2 num_get virtual functions
25.4.2.2 Class template num_put
25.4.2.2.1 num_put members
25.4.2.2.2 num_put virtual functions
25.4.3 The numeric punctuation facet
25.4.3.1 Class template numpunct
25.4.3.1.1 numpunct members
25.4.3.1.2 numpunct virtual functions
25.4.3.2 Class template numpunct_byname
25.4.4 The collate category
25.4.4.1 Class template collate
25.4.4.1.1 collate members
25.4.4.1.2 collate virtual functions
25.4.4.2 Class template collate_byname
25.4.5 The time category
25.4.5.1 Class template time_get
25.4.5.1.1 time_get members
25.4.5.1.2 time_get virtual functions
25.4.5.2 Class template time_get_byname
25.4.5.3 Class template time_put
25.4.5.3.1 time_put members
25.4.5.3.2 time_put virtual functions
25.4.5.4 Class template time_put_byname
25.4.6 The monetary category
25.4.6.1 Class template money_get
25.4.6.1.1 money_get members
25.4.6.1.2 money_get virtual functions
25.4.6.2 Class template money_put
25.4.6.2.1 money_put members
25.4.6.2.2 money_put virtual functions
25.4.6.3 Class template moneypunct
25.4.6.3.1 moneypunct members
25.4.6.3.2 moneypunct virtual functions
25.4.6.4 Class template moneypunct_byname
25.4.7 The message retrieval category
25.4.7.1 Class template messages
25.4.7.1.1 messages members
25.4.7.1.2 messages virtual functions
25.4.7.2 Class template messages_byname
25.4.8 Program-defined facets
25.5 C library locales
25.5.1 Header synopsis
26 Containers library
26.1 General
26.2 Container requirements
26.2.1 General container requirements
26.2.2 Container data races
26.2.3 Sequence containers
26.2.4 Node handles
26.2.4.1 node_handle overview
26.2.4.2 node_handle constructors, copy, and assignment
26.2.4.3 node_handle destructor
26.2.4.4 node_handle observers
26.2.4.5 node_handle modifiers
26.2.5 Insert return type
26.2.6 Associative containers
26.2.6.1 Exception safety guarantees
26.2.7 Unordered associative containers
26.2.7.1 Exception safety guarantees
26.3 Sequence containers
26.3.1 In general
26.3.3 Header synopsis
26.3.4 Header synopsis
26.3.5 Header synopsis
26.3.6 Header synopsis
26.3.7 Class template array
26.3.7.1 Class template array overview
26.3.7.2 array constructors, copy, and assignment
26.3.7.3 array specialized algorithms
26.3.7.4 array::size
26.3.7.5 array::data
26.3.7.6 array::fill
26.3.7.7 array::swap
26.3.7.8 Zero sized arrays
26.3.7.9 Tuple interface to class template array
26.3.8 Class template deque
26.3.8.1 Class template deque overview
26.3.8.2 deque constructors, copy, and assignment
26.3.8.3 deque capacity
26.3.8.4 deque modifiers
26.3.8.5 deque specialized algorithms
26.3.9 Class template forward_list
26.3.9.1 Class template forward_list overview
26.3.9.2 forward_list constructors, copy, assignment
26.3.9.3 forward_list iterators
26.3.9.4 forward_list element access
26.3.9.5 forward_list modifiers
26.3.9.6 forward_list operations
26.3.9.7 forward_list specialized algorithms
26.3.10 Class template list
26.3.10.1 Class template list overview
26.3.10.2 list constructors, copy, and assignment
26.3.10.3 list capacity
26.3.10.4 list modifiers
26.3.10.5 list operations
26.3.10.6 list specialized algorithms
26.3.11 Class template vector
26.3.11.1 Class template vector overview
26.3.11.2 vector constructors, copy, and assignment
26.3.11.3 vector capacity
26.3.11.4 vector data
26.3.11.5 vector modifiers
26.3.11.6 vector specialized algorithms
26.3.12 Class vector
26.4 Associative containers
26.4.1 In general
26.4.2 Header
26.4.3 Header synopsis
26.4.4 Class template map
26.4.4.1 Class template map overview
26.4.4.2 map constructors, copy, and assignment
26.4.4.3 map element access
26.4.4.4 map modifiers
26.4.4.5 map specialized algorithms
26.4.5 Class template multimap
26.4.5.1 Class template multimap overview
26.4.5.2 multimap constructors
26.4.5.3 multimap modifiers
26.4.5.4 multimap specialized algorithms
26.4.6 Class template set
26.4.6.1 Class template set overview
26.4.6.2 set constructors, copy, and assignment
26.4.6.3 set specialized algorithms
26.4.7 Class template multiset
26.4.7.1 Class template multiset overview
26.4.7.2 multiset constructors
26.4.7.3 multiset specialized algorithms
26.5 Unordered associative containers
26.5.1 In general
26.5.2 Header synopsis
26.5.3 Header synopsis
26.5.4 Class template unordered_map
26.5.4.1 Class template unordered_map overview
26.5.4.2 unordered_map constructors
26.5.4.3 unordered_map element access
26.5.4.4 unordered_map modifiers
26.5.4.5 unordered_map swap
26.5.5 Class template unordered_multimap
26.5.5.1 Class template unordered_multimap overview
26.5.5.2 unordered_multimap constructors
26.5.5.3 unordered_multimap modifiers
26.5.5.4 unordered_multimap swap
26.5.6 Class template unordered_set
26.5.6.1 Class template unordered_set overview
26.5.6.2 unordered_set constructors
26.5.6.3 unordered_set swap
26.5.7 Class template unordered_multiset
26.5.7.1 Class template unordered_multiset overview
26.5.7.2 unordered_multiset constructors
26.5.7.3 unordered_multiset swap
26.6 Container adaptors
26.6.1 In general
26.6.2 Header synopsis
26.6.3 Header synopsis
26.6.4 Class template queue
26.6.4.1 queue definition
26.6.4.2 queue constructors
26.6.4.3 queue constructors with allocators
26.6.4.4 queue operators
26.6.4.5 queue specialized algorithms
26.6.5 Class template priority_queue
26.6.5.1 priority_queue constructors
26.6.5.2 priority_queue constructors with allocators
26.6.5.3 priority_queue members
26.6.5.4 priority_queue specialized algorithms
26.6.6 Class template stack
26.6.6.1 stack definition
26.6.6.2 stack constructors
26.6.6.3 stack constructors with allocators
26.6.6.4 stack operators
26.6.6.5 stack specialized algorithms
27 Iterators library
27.1 General
27.2 Iterator requirements
27.2.1 In general
27.2.2 Iterator
27.2.3 Input iterators
27.2.4 Output iterators
27.2.5 Forward iterators
27.2.6 Bidirectional iterators
27.2.7 Random access iterators
27.3 Header synopsis
27.4 Iterator primitives
27.4.1 Iterator traits
27.4.2 Standard iterator tags
27.4.3 Iterator operations
27.5 Iterator adaptors
27.5.1 Reverse iterators
27.5.1.1 Class template reverse_iterator
27.5.1.2 reverse_iterator requirements
27.5.1.3 reverse_iterator operations
27.5.1.3.1 reverse_iterator constructor
27.5.1.3.2 reverse_iterator::operator=
27.5.1.3.3 Conversion
27.5.1.3.4 operator*
27.5.1.3.5 operator->
27.5.1.3.6 operator++
27.5.1.3.7 operator--
27.5.1.3.8 operator+
27.5.1.3.9 operator+=
27.5.1.3.10 operator-
27.5.1.3.11 operator-=
27.5.1.3.12 operator[]
27.5.1.3.13 operator==
27.5.1.3.14 operator<
27.5.1.3.15 operator!=
27.5.1.3.16 operator>
27.5.1.3.17 operator>=
27.5.1.3.18 operator<=
27.5.1.3.19 operator-
27.5.1.3.20 operator+
27.5.1.3.21 Non-member function make_reverse_iterator()
27.5.2 Insert iterators
27.5.2.1 Class template back_insert_iterator
27.5.2.2 back_insert_iterator operations
27.5.2.2.1 back_insert_iterator constructor
27.5.2.2.2 back_insert_iterator::operator=
27.5.2.2.3 back_insert_iterator::operator*
27.5.2.2.4 back_insert_iterator::operator++
27.5.2.2.5 back_inserter
27.5.2.3 Class template front_insert_iterator
27.5.2.4 front_insert_iterator operations
27.5.2.4.1 front_insert_iterator constructor
27.5.2.4.2 front_insert_iterator::operator=
27.5.2.4.3 front_insert_iterator::operator*
27.5.2.4.4 front_insert_iterator::operator++
27.5.2.4.5 front_inserter
27.5.2.5 Class template insert_iterator
27.5.2.6 insert_iterator operations
27.5.2.6.1 insert_iterator constructor
27.5.2.6.2 insert_iterator::operator=
27.5.2.6.3 insert_iterator::operator*
27.5.2.6.4 insert_iterator::operator++
27.5.2.6.5 inserter
27.5.3 Move iterators
27.5.3.1 Class template move_iterator
27.5.3.2 move_iterator requirements
27.5.3.3 move_iterator operations
27.5.3.3.1 move_iterator constructors
27.5.3.3.2 move_iterator::operator=
27.5.3.3.3 move_iterator conversion
27.5.3.3.4 move_iterator::operator*
27.5.3.3.5 move_iterator::operator->
27.5.3.3.6 move_iterator::operator++
27.5.3.3.7 move_iterator::operator--
27.5.3.3.8 move_iterator::operator+
27.5.3.3.9 move_iterator::operator+=
27.5.3.3.10 move_iterator::operator-
27.5.3.3.11 move_iterator::operator-=
27.5.3.3.12 move_iterator::operator[]
27.5.3.3.13 move_iterator comparisons
27.5.3.3.14 move_iterator non-member functions
27.6 Stream iterators
27.6.1 Class template istream_iterator
27.6.1.1 istream_iterator constructors and destructor
27.6.1.2 istream_iterator operations
27.6.2 Class template ostream_iterator
27.6.2.1 ostream_iterator constructors and destructor
27.6.2.2 ostream_iterator operations
27.6.3 Class template istreambuf_iterator
27.6.3.1 Class template istreambuf_iterator::proxy
27.6.3.2 istreambuf_iterator constructors
27.6.3.3 istreambuf_iterator operations
27.6.4 Class template ostreambuf_iterator
27.6.4.1 ostreambuf_iterator constructors
27.6.4.2 ostreambuf_iterator operations
27.7 Range access
27.8 Container access
28 Algorithms library
28.1 General
28.3 Algorithms requirements
28.4 Parallel algorithms
28.4.1 Terms and definitions
28.4.2 Requirements on user-provided function objects
28.4.3 Effect of execution policies on algorithm execution
28.4.4 Parallel algorithm exceptions
28.4.5 ExecutionPolicy algorithm overloads
28.5 Non-modifying sequence operations
28.5.1 All of
28.5.2 Any of
28.5.3 None of
28.5.4 For each
28.5.5 Find
28.5.6 Find end
28.5.7 Find first
28.5.8 Adjacent find
28.5.9 Count
28.5.10 Mismatch
28.5.11 Equal
28.5.12 Is permutation
28.5.13 Search
28.6 Mutating sequence operations
28.6.1 Copy
28.6.2 Move
28.6.3 Swap
28.6.4 Transform
28.6.5 Replace
28.6.6 Fill
28.6.7 Generate
28.6.8 Remove
28.6.9 Unique
28.6.10 Reverse
28.6.11 Rotate
28.6.12 Sample
28.6.13 Shuffle
28.7 Sorting and related operations
28.7.1 Sorting
28.7.1.1 sort
28.7.1.2 stable_sort
28.7.1.3 partial_sort
28.7.1.4 partial_sort_copy
28.7.1.5 is_sorted
28.7.2 Nth element
28.7.3 Binary search
28.7.3.1 lower_bound
28.7.3.2 upper_bound
28.7.3.3 equal_range
28.7.3.4 binary_search
28.7.4 Partitions
28.7.5 Merge
28.7.6 Set operations on sorted structures
28.7.6.1 includes
28.7.6.2 set_union
28.7.6.3 set_intersection
28.7.6.4 set_difference
28.7.6.5 set_symmetric_difference
28.7.7 Heap operations
28.7.7.1 push_heap
28.7.7.2 pop_heap
28.7.7.3 make_heap
28.7.7.4 sort_heap
28.7.7.5 is_heap
28.7.8 Minimum and maximum
28.7.9 Bounded value
28.7.10 Lexicographical comparison
28.7.11 Permutation generators
28.8 C library algorithms
29 Numerics library
29.1 General
29.2 Definitions
29.3 Numeric type requirements
29.4 The floating-point environment
29.4.1 Header synopsis
29.5 Complex numbers
29.5.1 Header synopsis
29.5.2 Class template complex
29.5.3 complex specializations
29.5.4 complex member functions
29.5.5 complex member operators
29.5.6 complex non-member operations
29.5.7 complex value operations
29.5.8 complex transcendentals
29.5.9 Additional overloads
29.5.10 Suffixes for complex number literals
29.6 Random number generation
29.6.1 Requirements
29.6.1.1 General requirements
29.6.1.2 Seed sequence requirements
29.6.1.3 Uniform random bit generator requirements
29.6.1.4 Random number engine requirements
29.6.1.5 Random number engine adaptor requirements
29.6.1.6 Random number distribution requirements
29.6.2 Header synopsis
29.6.3 Random number engine class templates
29.6.3.1 Class template linear_congruential_engine
29.6.3.2 Class template mersenne_twister_engine
29.6.3.3 Class template subtract_with_carry_engine
29.6.4 Random number engine adaptor class templates
29.6.4.1 In general
29.6.4.2 Class template discard_block_engine
29.6.4.3 Class template independent_bits_engine
29.6.4.4 Class template shuffle_order_engine
29.6.5 Engines and engine adaptors with predefined parameters
29.6.6 Class random_device
29.6.7 Utilities
29.6.7.1 Class seed_seq
29.6.7.2 Function template generate_canonical
29.6.8 Random number distribution class templates
29.6.8.1 In general
29.6.8.2 Uniform distributions
29.6.8.2.1 Class template uniform_int_distribution
29.6.8.2.2 Class template uniform_real_distribution
29.6.8.3 Bernoulli distributions
29.6.8.3.1 Class bernoulli_distribution
29.6.8.3.2 Class template binomial_distribution
29.6.8.3.3 Class template geometric_distribution
29.6.8.3.4 Class template negative_binomial_distribution
29.6.8.4 Poisson distributions
29.6.8.4.1 Class template poisson_distribution
29.6.8.4.2 Class template exponential_distribution
29.6.8.4.3 Class template gamma_distribution
29.6.8.4.4 Class template weibull_distribution
29.6.8.4.5 Class template extreme_value_distribution
29.6.8.5 Normal distributions
29.6.8.5.1 Class template normal_distribution
29.6.8.5.2 Class template lognormal_distribution
29.6.8.5.3 Class template chi_squared_distribution
29.6.8.5.4 Class template cauchy_distribution
29.6.8.5.5 Class template fisher_f_distribution
29.6.8.5.6 Class template student_t_distribution
29.6.8.6 Sampling distributions
29.6.8.6.1 Class template discrete_distribution
29.6.8.6.2 Class template piecewise_constant_distribution
29.6.8.6.3 Class template piecewise_linear_distribution
29.6.9 Low-quality random number generation
29.7 Numeric arrays
29.7.1 Header synopsis
29.7.2 Class template valarray
29.7.2.1 Class template valarray overview
29.7.2.2 valarray constructors
29.7.2.3 valarray assignment
29.7.2.4 valarray element access
29.7.2.5 valarray subset operations
29.7.2.6 valarray unary operators
29.7.2.7 valarray compound assignment
29.7.2.8 valarray member functions
29.7.3 valarray non-member operations
29.7.3.1 valarray binary operators
29.7.3.2 valarray logical operators
29.7.3.3 valarray transcendentals
29.7.3.4 valarray specialized algorithms
29.7.4 Class slice
29.7.4.1 Class slice overview
29.7.4.2 slice constructors
29.7.4.3 slice access functions
29.7.5 Class template slice_array
29.7.5.1 Class template slice_array overview
29.7.5.2 slice_array assignment
29.7.5.3 slice_array compound assignment
29.7.5.4 slice_array fill function
29.7.6 The gslice class
29.7.6.1 The gslice class overview
29.7.6.2 gslice constructors
29.7.6.3 gslice access functions
29.7.7 Class template gslice_array
29.7.7.1 Class template gslice_array overview
29.7.7.2 gslice_array assignment
29.7.7.3 gslice_array compound assignment
29.7.7.4 gslice_array fill function
29.7.8 Class template mask_array
29.7.8.1 Class template mask_array overview
29.7.8.2 mask_array assignment
29.7.8.3 mask_array compound assignment
29.7.8.4 mask_array fill function
29.7.9 Class template indirect_array
29.7.9.1 Class template indirect_array overview
29.7.9.2 indirect_array assignment
29.7.9.3 indirect_array compound assignment
29.7.9.4 indirect_array fill function
29.7.10 valarray range access
29.8 Generalized numeric operations
29.8.1 Header synopsis
29.8.2 Accumulate
29.8.3 Reduce
29.8.4 Inner product
29.8.5 Transform reduce
29.8.6 Partial sum
29.8.7 Exclusive scan
29.8.8 Inclusive scan
29.8.9 Transform exclusive scan
29.8.10 Transform inclusive scan
29.8.11 Adjacent difference
29.8.12 Iota
29.8.13 Greatest common divisor
29.8.14 Least common multiple
29.9 Mathematical functions for floating-point types
29.9.1 Header synopsis
29.9.2 Absolute values
29.9.3 Three-dimensional hypotenuse
29.9.4 Classification / comparison functions
29.9.5 Mathematical special functions
29.9.5.1 Associated Laguerre polynomials
29.9.5.2 Associated Legendre functions
29.9.5.3 Beta function
29.9.5.4 Complete elliptic integral of the first kind
29.9.5.5 Complete elliptic integral of the second kind
29.9.5.6 Complete elliptic integral of the third kind
29.9.5.7 Regular modified cylindrical Bessel functions
29.9.5.8 Cylindrical Bessel functions of the first kind
29.9.5.9 Irregular modified cylindrical Bessel functions
29.9.5.10 Cylindrical Neumann functions
29.9.5.11 Incomplete elliptic integral of the first kind
29.9.5.12 Incomplete elliptic integral of the second kind
29.9.5.13 Incomplete elliptic integral of the third kind
29.9.5.14 Exponential integral
29.9.5.15 Hermite polynomials
29.9.5.16 Laguerre polynomials
29.9.5.17 Legendre polynomials
29.9.5.18 Riemann zeta function
29.9.5.19 Spherical Bessel functions of the first kind
29.9.5.20 Spherical associated Legendre functions
29.9.5.21 Spherical Neumann functions
30 Input/output library
30.1 General
30.2 Iostreams requirements
30.2.1 Imbue limitations
30.2.2 Positioning type limitations
30.2.3 Thread safety
30.3 Forward declarations
30.3.1 Header synopsis
30.3.2 Overview
30.4 Standard iostream objects
30.4.1 Header synopsis
30.4.2 Overview
30.4.3 Narrow stream objects
30.4.4 Wide stream objects
30.5 Iostreams base classes
30.5.1 Header synopsis
30.5.2 Types
30.5.3 Class ios_base
30.5.3.1 Types
30.5.3.1.1 Class ios_base::failure
30.5.3.1.2 Type ios_base::fmtflags
30.5.3.1.3 Type ios_base::iostate
30.5.3.1.4 Type ios_base::openmode
30.5.3.1.5 Type ios_base::seekdir
30.5.3.1.6 Class ios_base::Init
30.5.3.2 ios_base state functions
30.5.3.3 ios_base functions
30.5.3.4 ios_base static members
30.5.3.5 ios_base storage functions
30.5.3.6 ios_base callbacks
30.5.3.7 ios_base constructors/destructor
30.5.4 Class template fpos
30.5.4.1 fpos members
30.5.4.2 fpos requirements
30.5.5 Class template basic_ios
30.5.5.1 Overview
30.5.5.2 basic_ios constructors
30.5.5.3 Member functions
30.5.5.4 basic_ios flags functions
30.5.6 ios_base manipulators
30.5.6.1 fmtflags manipulators
30.5.6.2 adjustfield manipulators
30.5.6.3 basefield manipulators
30.5.6.4 floatfield manipulators
30.5.6.5 Error reporting
30.6 Stream buffers
30.6.1 Header synopsis
30.6.2 Stream buffer requirements
30.6.3 Class template basic_streambuf
30.6.3.1 basic_streambuf constructors
30.6.3.2 basic_streambuf public member functions
30.6.3.2.1 Locales
30.6.3.2.2 Buffer management and positioning
30.6.3.2.3 Get area
30.6.3.2.4 Putback
30.6.3.2.5 Put area
30.6.3.3 basic_streambuf protected member functions
30.6.3.3.1 Assignment
30.6.3.3.2 Get area access
30.6.3.3.3 Put area access
30.6.3.4 basic_streambuf virtual functions
30.6.3.4.1 Locales
30.6.3.4.2 Buffer management and positioning
30.6.3.4.3 Get area
30.6.3.4.4 Putback
30.6.3.4.5 Put area
30.7 Formatting and manipulators
30.7.1 Header synopsis
30.7.2 Header synopsis
30.7.3 Header synopsis
30.7.4 Input streams
30.7.4.1 Class template basic_istream
30.7.4.1.1 basic_istream constructors
30.7.4.1.2 Class basic_istream assign and swap
30.7.4.1.3 Class basic_istream::sentry
30.7.4.2 Formatted input functions
30.7.4.2.1 Common requirements
30.7.4.2.2 Arithmetic extractors
30.7.4.2.3 basic_istream::operator>>
30.7.4.3 Unformatted input functions
30.7.4.4 Standard basic_istream manipulators
30.7.4.5 Rvalue stream extraction
30.7.4.6 Class template basic_iostream
30.7.4.6.1 basic_iostream constructors
30.7.4.6.2 basic_iostream destructor
30.7.4.6.3 basic_iostream assign and swap
30.7.5 Output streams
30.7.5.1 Class template basic_ostream
30.7.5.1.1 basic_ostream constructors
30.7.5.1.2 Class basic_ostream assign and swap
30.7.5.1.3 Class basic_ostream::sentry
30.7.5.1.4 basic_ostream seek members
30.7.5.2 Formatted output functions
30.7.5.2.1 Common requirements
30.7.5.2.2 Arithmetic inserters
30.7.5.2.3 basic_ostream::operator<<
30.7.5.2.4 Character inserter function templates
30.7.5.3 Unformatted output functions
30.7.5.4 Standard basic_ostream manipulators
30.7.5.5 Rvalue stream insertion
30.7.6 Standard manipulators
30.7.7 Extended manipulators
30.7.8 Quoted manipulators
30.8 String-based streams
30.8.1 Header synopsis
30.8.2 Class template basic_stringbuf
30.8.2.1 basic_stringbuf constructors
30.8.2.2 Assign and swap
30.8.2.3 Member functions
30.8.2.4 Overridden virtual functions
30.8.3 Class template basic_istringstream
30.8.3.1 basic_istringstream constructors
30.8.3.2 Assign and swap
30.8.3.3 Member functions
30.8.4 Class template basic_ostringstream
30.8.4.1 basic_ostringstream constructors
30.8.4.2 Assign and swap
30.8.4.3 Member functions
30.8.5 Class template basic_stringstream
30.8.5.1 basic_stringstream constructors
30.8.5.2 Assign and swap
30.8.5.3 Member functions
30.9 File-based streams
30.9.1 Header synopsis
30.9.2 Class template basic_filebuf
30.9.2.1 basic_filebuf constructors
30.9.2.2 Assign and swap
30.9.2.3 Member functions
30.9.2.4 Overridden virtual functions
30.9.3 Class template basic_ifstream
30.9.3.1 basic_ifstream constructors
30.9.3.2 Assign and swap
30.9.3.3 Member functions
30.9.4 Class template basic_ofstream
30.9.4.1 basic_ofstream constructors
30.9.4.2 Assign and swap
30.9.4.3 Member functions
30.9.5 Class template basic_fstream
30.9.5.1 basic_fstream constructors
30.9.5.2 Assign and swap
30.9.5.3 Member functions
30.10 File systems
30.10.1 General
30.10.2 Conformance
30.10.2.1 POSIX conformance
30.10.2.2 Operating system dependent behavior conformance
30.10.2.3 File system race behavior
30.10.3 Normative references
30.10.4 Terms and definitions
30.10.5 Requirements
30.10.5.1 Namespaces and headers
30.10.6 Header synopsis
30.10.7 Error reporting
30.10.8 Class path
30.10.8.1 Generic pathname format
30.10.8.2 path conversions
30.10.8.2.1 path argument format conversions
30.10.8.2.2 path type and encoding conversions
30.10.8.3 path requirements
30.10.8.4 path members
30.10.8.4.1 path constructors
30.10.8.4.2 path assignments
30.10.8.4.3 path appends
30.10.8.4.4 path concatenation
30.10.8.4.5 path modifiers
30.10.8.4.6 path native format observers
30.10.8.4.7 path generic format observers
30.10.8.4.8 path compare
30.10.8.4.9 path decomposition
30.10.8.4.10 path query
30.10.8.4.11 path generation
30.10.8.5 path iterators
30.10.8.6 path non-member functions
30.10.8.6.1 path inserter and extractor
30.10.8.6.2 path factory functions
30.10.9 Class filesystem_error
30.10.9.1 filesystem_error members
30.10.10 Enumerations
30.10.10.1 Enum path::format
30.10.10.2 Enum class file_type
30.10.10.3 Enum class copy_options
30.10.10.4 Enum class perms
30.10.10.5 Enum class perm_options
30.10.10.6 Enum class directory_options
30.10.11 Class file_status
30.10.11.1 file_status constructors
30.10.11.2 file_status observers
30.10.11.3 file_status modifiers
30.10.12 Class directory_entry
30.10.12.1 directory_entry constructors
30.10.12.2 directory_entry modifiers
30.10.12.3 directory_entry observers
30.10.13 Class directory_iterator
30.10.13.1 directory_iterator members
30.10.13.2 directory_iterator non-member functions
30.10.14 Class recursive_directory_iterator
30.10.14.1 recursive_directory_iterator members
30.10.14.2 recursive_directory_iterator non-member functions
30.10.15 Filesystem operation functions
30.10.15.1 Absolute
30.10.15.2 Canonical
30.10.15.3 Copy
30.10.15.4 Copy file
30.10.15.5 Copy symlink
30.10.15.6 Create directories
30.10.15.7 Create directory
30.10.15.8 Create directory symlink
30.10.15.9 Create hard link
30.10.15.10 Create symlink
30.10.15.11 Current path
30.10.15.12 Equivalent
30.10.15.13 Exists
30.10.15.14 File size
30.10.15.15 Hard link count
30.10.15.16 Is block file
30.10.15.17 Is character file
30.10.15.18 Is directory
30.10.15.19 Is empty
30.10.15.20 Is fifo
30.10.15.21 Is other
30.10.15.22 Is regular file
30.10.15.23 Is socket
30.10.15.24 Is symlink
30.10.15.25 Last write time
30.10.15.26 Permissions
30.10.15.27 Proximate
30.10.15.28 Read symlink
30.10.15.29 Relative
30.10.15.30 Remove
30.10.15.31 Remove all
30.10.15.32 Rename
30.10.15.33 Resize file
30.10.15.34 Space
30.10.15.35 Status
30.10.15.36 Status known
30.10.15.37 Symlink status
30.10.15.38 Temporary directory path
30.10.15.39 Weakly canonical
30.11 C library files
30.11.1 Header synopsis
30.11.2 Header synopsis
31 Regular expressions library
31.1 General
31.2 Definitions
31.3 Requirements
31.4 Header synopsis
31.5 Namespace std::regex_constants
31.5.1 Bitmask type syntax_option_type
31.5.2 Bitmask type match_flag_type
31.5.3 Implementation-defined error_type
31.6 Class regex_error
31.7 Class template regex_traits
31.8 Class template basic_regex
31.8.1 basic_regex constants
31.8.2 basic_regex constructors
31.8.3 basic_regex assign
31.8.4 basic_regex constant operations
31.8.5 basic_regex locale
31.8.6 basic_regex swap
31.8.7 basic_regex non-member functions
31.8.7.1 basic_regex non-member swap
31.9 Class template sub_match
31.9.1 sub_match members
31.9.2 sub_match non-member operators
31.10 Class template match_results
31.10.1 match_results constructors
31.10.2 match_results state
31.10.3 match_results size
31.10.4 match_results element access
31.10.5 match_results formatting
31.10.6 match_results allocator
31.10.7 match_results swap
31.10.8 match_results non-member functions
31.11 Regular expression algorithms
31.11.1 Exceptions
31.11.2 regex_match
31.11.3 regex_search
31.11.4 regex_replace
31.12 Regular expression iterators
31.12.1 Class template regex_iterator
31.12.1.1 regex_iterator constructors
31.12.1.2 regex_iterator comparisons
31.12.1.3 regex_iterator indirection
31.12.1.4 regex_iterator increment
31.12.2 Class template regex_token_iterator
31.12.2.1 regex_token_iterator constructors
31.12.2.2 regex_token_iterator comparisons
31.12.2.3 regex_token_iterator indirection
31.12.2.4 regex_token_iterator increment
31.13 Modified ECMAScript regular expression grammar
32 Atomic operations library
32.1 General
32.3 Type aliases
32.4 Order and consistency
32.5 Lock-free property
32.6 Class template atomic
32.6.1 Operations on atomic types
32.6.2 Specializations for integers
32.6.3 Partial specialization for pointers
32.6.4 Member operators common to integers and pointers to objects
32.7 Non-member functions
32.8 Flag type and operations
32.9 Fences
33 Thread support library
33.1 General
33.2 Requirements
33.2.1 Template parameter names
33.2.2 Exceptions
33.2.3 Native handles
33.2.4 Timing specifications
33.2.5 Requirements for Lockable types
33.2.5.1 In general
33.2.5.2 BasicLockable requirements
33.2.5.3 Lockable requirements
33.2.5.4 TimedLockable requirements
33.2.6 decay_copy
33.3 Threads
33.3.1 Header synopsis
33.3.2 Class thread
33.3.2.1 Class thread::id
33.3.2.2 thread constructors
33.3.2.3 thread destructor
33.3.2.4 thread assignment
33.3.2.5 thread members
33.3.2.6 thread static members
33.3.2.7 thread specialized algorithms
33.3.3 Namespace this_thread
33.4 Mutual exclusion
33.4.1 Header synopsis
33.4.2 Header synopsis
33.4.3 Mutex requirements
33.4.3.1 In general
33.4.3.2 Mutex types
33.4.3.2.1 Class mutex
33.4.3.2.2 Class recursive_mutex
33.4.3.3 Timed mutex types
33.4.3.3.1 Class timed_mutex
33.4.3.3.2 Class recursive_timed_mutex
33.4.3.4 Shared mutex types
33.4.3.4.1 Class shared_mutex
33.4.3.5 Shared timed mutex types
33.4.3.5.1 Class shared_timed_mutex
33.4.4 Locks
33.4.4.1 Class template lock_guard
33.4.4.2 Class template scoped_lock
33.4.4.3 Class template unique_lock
33.4.4.3.1 unique_lock constructors, destructor, and assignment
33.4.4.3.2 unique_lock locking
33.4.4.3.3 unique_lock modifiers
33.4.4.3.4 unique_lock observers
33.4.4.4 Class template shared_lock
33.4.4.4.1 shared_lock constructors, destructor, and assignment
33.4.4.4.2 shared_lock locking
33.4.4.4.3 shared_lock modifiers
33.4.4.4.4 shared_lock observers
33.4.5 Generic locking algorithms
33.4.6 Call once
33.4.6.1 Struct once_flag
33.4.6.2 Function call_once
33.5 Condition variables
33.5.1 Header synopsis
33.5.2 Non-member functions
33.5.3 Class condition_variable
33.5.4 Class condition_variable_any
33.6 Futures
33.6.1 Overview
33.6.2 Header synopsis
33.6.3 Error handling
33.6.4 Class future_error
33.6.5 Shared state
33.6.6 Class template promise
33.6.7 Class template future
33.6.8 Class template shared_future
33.6.9 Function template async
33.6.10 Class template packaged_task
33.6.10.1 packaged_task member functions
33.6.10.2 packaged_task globals
Annex A Grammar summary
A.1 Keywords
A.2 Lexical conventions
A.3 Basic concepts
A.4 Expressions
A.5 Statements
A.6 Declarations
A.7 Declarators
A.8 Classes
A.9 Derived classes
A.10 Special member functions
A.11 Overloading
A.12 Templates
A.13 Exception handling
A.14 Preprocessing directives
Annex B Implementation quantities
Annex C Compatibility
C.1 C++ and ISO C
C.1.1 Clause 5: lexical conventions
C.1.2 Clause 6: basic concepts
C.1.3 Clause 7: standard conversions
C.1.4 Clause 8: expressions
C.1.5 Clause 9: statements
C.1.6 Clause 10: declarations
C.1.7 Clause 11: declarators
C.1.8 Clause 12: classes
C.1.9 Clause 15: special member functions
C.1.10 Clause 19: preprocessing directives
C.2 C++ and ISO C++ 2003
C.2.1 Clause 5: lexical conventions
C.2.2 Clause 7: standard conversions
C.2.3 Clause 8: expressions
C.2.4 Clause 10: declarations
C.2.5 Clause 11: declarators
C.2.6 Clause 15: special member functions
C.2.7 Clause 17: templates
C.2.8 Clause 20: library introduction
C.2.9 Clause 21: language support library
C.2.10 Clause 22: diagnostics library
C.2.11 Clause 23: general utilities library
C.2.12 Clause 24: strings library
C.2.13 Clause 26: containers library
C.2.14 Clause 28: algorithms library
C.2.15 Clause 29: numerics library
C.2.16 Clause 30: input/output library
C.3 C++ and ISO C++ 2011
C.3.1 Clause 5: lexical conventions
C.3.2 Clause 6: basic concepts
C.3.3 Clause 8: expressions
C.3.4 Clause 10: declarations
C.3.5 Clause 11: declarators
C.3.6 Clause 20: library introduction
C.3.7 Clause 30: input/output library
C.4 C++ and ISO C++ 2014
C.4.1 Clause 5: lexical conventions
C.4.2 Clause 8: expressions
C.4.3 Clause 10: declarations
C.4.4 Clause 11: declarators
C.4.5 Clause 15: special member functions
C.4.6 Clause 17: templates
C.4.7 Clause 18: exception handling
C.4.8 Clause 20: library introduction
C.4.9 Clause 23: general utilities library
C.4.10 Clause 24: strings library
C.4.11 Clause 26: containers library
C.4.12 Annex D: compatibility features
C.5 C standard library
C.5.1 Modifications to headers
C.5.2 Modifications to definitions
C.5.2.1 Types char16_t and char32_t
C.5.2.2 Type wchar_t
C.5.2.4 Header
C.5.2.5 Header
C.5.2.6 Header
C.5.2.7 Macro NULL
C.5.3 Modifications to declarations
C.5.4 Modifications to behavior
C.5.4.1 Macro offsetof(type, member-designator)
C.5.4.2 Memory allocation functions
Annex D Compatibility features
D.1 Redeclaration of static constexpr data members
D.2 Implicit declaration of copy functions
D.3 Deprecated exception specifications
D.4 C++ standard library headers
D.4.1 Header synopsis
D.4.2 Header synopsis
D.4.3 Header synopsis
D.4.4 Header synopsis
D.5 C standard library headers
D.6 char* streams
D.6.1 Class strstreambuf
D.6.1.1 strstreambuf constructors
D.6.1.2 Member functions
D.6.1.3 strstreambuf overridden virtual functions
D.6.2 Class istrstream
D.6.2.1 istrstream constructors
D.6.2.2 Member functions
D.6.3 Class ostrstream
D.6.3.1 ostrstream constructors
D.6.3.2 Member functions
D.6.4 Class strstream
D.6.4.1 strstream constructors
D.6.4.2 strstream destructor
D.6.4.3 strstream operations
D.7 uncaught_exception
D.8 Old adaptable function bindings
D.8.1 Weak result types
D.8.2 Typedefs to support function binders
D.8.3 Negators
D.9 The default allocator
D.10 Raw storage iterator
D.11 Temporary buffers
D.12 Deprecated type traits
D.13 Deprecated iterator primitives
D.13.1 Basic iterator
D.14 Deprecated shared_ptr observers
D.15 Deprecated standard code conversion facets
D.15.1 Header synopsis
D.15.2 Requirements
D.16 Deprecated convenience conversion interfaces
D.16.1 Class template wstring_convert
D.16.2 Class template wbuffer_convert
Cross references
Cross references from ISO C++ 2014
Index
Index of grammar productions
Index of library names
Index of implementation-defined behavior