Working Draft, Standard for Programming Language C++

(Generated on 2020-07-15 from the LaTeX sources by cxxdraft-htmlgen. This is not an ISO publication.)

Note: this is an early draft. It's known to be incomplet and incorrekt, and it has lots of bad formatting.


1 Scope [intro.scope][intro.scope]

2 Normative references [intro.refs][intro.refs]

3 Terms and definitions [intro.defs][intro.defs]

4 General principles [intro][intro]

4.1 Implementation compliance [intro.compliance]

4.1.1 Abstract machine [intro.abstract]

4.2 Structure of this document [intro.structure]

4.3 Syntax notation [syntax]

4.4 Acknowledgments [intro.ack]

5 Lexical conventions [lex][lex]

5.1 Separate translation [lex.separate]

5.2 Phases of translation [lex.phases]

5.3 Character sets [lex.charset]

5.4 Preprocessing tokens [lex.pptoken]

5.5 Alternative tokens [lex.digraph]

5.8 Header names [lex.header]

5.9 Preprocessing numbers [lex.ppnumber]

5.10 Identifiers []

5.11 Keywords [lex.key]

5.12 Operators and punctuators [lex.operators]

5.13 Literals [lex.literal]

5.13.1 Kinds of literals [lex.literal.kinds]

5.13.2 Integer literals [lex.icon]

5.13.3 Character literals [lex.ccon]

5.13.4 Floating-point literals [lex.fcon]

5.13.5 String literals [lex.string]

5.13.6 Boolean literals [lex.bool]

5.13.7 Pointer literals [lex.nullptr]

5.13.8 User-defined literals [lex.ext]

6 Basics [basic][basic]

6.1 Preamble [basic.pre]

6.2 Declarations and definitions [basic.def]

6.3 One-definition rule [basic.def.odr]

6.4 Scope [basic.scope]

6.4.1 Declarative regions and scopes [basic.scope.declarative]

6.4.2 Point of declaration [basic.scope.pdecl]

6.4.4 Function parameter scope [basic.scope.param]

6.4.5 Function scope [basic.funscope]

6.4.8 Enumeration scope [basic.scope.enum]

6.4.9 Template parameter scope [basic.scope.temp]

6.5 Name lookup [basic.lookup]

6.5.1 Unqualified name lookup [basic.lookup.unqual]

6.5.2 Argument-dependent name lookup [basic.lookup.argdep]

6.5.3 Qualified name lookup [basic.lookup.qual] Class members [class.qual] Namespace members [namespace.qual]

6.5.4 Elaborated type specifiers [basic.lookup.elab]

6.5.5 Class member access [basic.lookup.classref]

6.5.6 Using-directives and namespace aliases [basic.lookup.udir]

6.7 Memory and objects [basic.memobj]

6.7.1 Memory model [intro.memory]

6.7.2 Object model [intro.object]

6.7.4 Indeterminate values [basic.indet]

6.7.5 Storage duration [] Static storage duration [] Thread storage duration [] Automatic storage duration [] Dynamic storage duration [] Safely-derived pointers [] Duration of subobjects []

6.7.7 Temporary objects [class.temporary]

6.8 Types [basic.types]

6.8.1 Fundamental types [basic.fundamental]

6.8.2 Compound types [basic.compound]

6.8.4 Integer conversion rank [conv.rank]

6.9 Program execution [basic.exec]

6.9.1 Sequential execution [intro.execution]

6.9.2 Multi-threaded executions and data races [intro.multithread] Forward progress [intro.progress]

6.9.3 Start and termination [basic.start] Static initialization [basic.start.static] Dynamic initialization of non-local variables [basic.start.dynamic]

7 Expressions [expr][expr]

7.1 Preamble [expr.pre]

7.2 Properties of expressions [expr.prop]

7.2.1 Value category [basic.lval]

7.2.3 Context dependence [expr.context]

7.3 Standard conversions [conv]

7.3.1 Lvalue-to-rvalue conversion [conv.lval]

7.3.2 Array-to-pointer conversion [conv.array]

7.3.3 Function-to-pointer conversion [conv.func]

7.3.4 Temporary materialization conversion [conv.rval]

7.3.5 Qualification conversions [conv.qual]

7.3.6 Integral promotions [conv.prom]

7.3.7 Floating-point promotion [conv.fpprom]

7.3.8 Integral conversions [conv.integral]

7.3.9 Floating-point conversions [conv.double]

7.3.10 Floating-integral conversions [conv.fpint]

7.3.11 Pointer conversions [conv.ptr]

7.3.12 Pointer-to-member conversions [conv.mem]

7.3.13 Function pointer conversions [conv.fctptr]

7.3.14 Boolean conversions [conv.bool]

7.4 Usual arithmetic conversions [expr.arith.conv]

7.6 Compound expressions [expr.compound]

7.6.1 Postfix expressions [] Subscripting [expr.sub] Function call [] Explicit type conversion (functional notation) [expr.type.conv] Class member access [expr.ref] Increment and decrement [] Type identification [expr.typeid]

7.6.3 Explicit type conversion (cast notation) [expr.cast]

7.6.4 Pointer-to-member operators [expr.mptr.oper]

7.6.5 Multiplicative operators [expr.mul]

7.6.6 Additive operators [expr.add]

7.6.7 Shift operators [expr.shift]

7.6.8 Three-way comparison operator [expr.spaceship]

7.6.9 Relational operators [expr.rel]

7.6.10 Equality operators [expr.eq]

7.6.11 Bitwise AND operator [expr.bit.and]

7.6.12 Bitwise exclusive OR operator [expr.xor]

7.6.13 Bitwise inclusive OR operator [expr.or]

7.6.14 Logical AND operator [expr.log.and]

7.6.15 Logical OR operator [expr.log.or]

7.6.16 Conditional operator [expr.cond]

7.6.17 Yielding a value [expr.yield]

7.6.18 Throwing an exception [expr.throw]

7.6.19 Assignment and compound assignment operators [expr.ass]

7.6.20 Comma operator [expr.comma]

7.7 Constant expressions [expr.const]

8 Statements [stmt.stmt][stmt.stmt]

8.1 Preamble [stmt.pre]

8.2 Labeled statement [stmt.label]

8.3 Expression statement [stmt.expr]

8.4 Compound statement or block [stmt.block]

8.5 Selection statements []

8.5.1 The if statement [stmt.if]

8.5.2 The switch statement [stmt.switch]

8.6 Iteration statements [stmt.iter]

8.6.1 The while statement [stmt.while]

8.6.2 The do statement []

8.6.3 The for statement [stmt.for]

8.6.4 The range-based for statement [stmt.ranged]

8.7 Jump statements [stmt.jump]

8.7.1 The break statement [stmt.break]

8.7.2 The continue statement [stmt.cont]

8.7.3 The return statement [stmt.return]

8.7.4 The co_­return statement [stmt.return.coroutine]

8.7.5 The goto statement [stmt.goto]

8.8 Declaration statement [stmt.dcl]

8.9 Ambiguity resolution [stmt.ambig]

9 Declarations [dcl.dcl][dcl.dcl]

9.1 Preamble [dcl.pre]

9.2 Specifiers [dcl.spec]

9.2.1 Storage class specifiers []

9.2.2 Function specifiers [dcl.fct.spec]

9.2.3 The typedef specifier [dcl.typedef]

9.2.4 The friend specifier [dcl.friend]

9.2.5 The constexpr and consteval specifiers [dcl.constexpr]

9.2.6 The constinit specifier [dcl.constinit]

9.2.7 The inline specifier [dcl.inline]

9.2.8 Type specifiers [dcl.type] The cv-qualifiers [] Simple type specifiers [dcl.type.simple] Elaborated type specifiers [dcl.type.elab] Decltype specifiers [dcl.type.decltype] Placeholder type specifiers [] Placeholder type deduction [] Deduced class template specialization types [dcl.type.class.deduct]

9.3 Declarators [dcl.decl]

9.3.1 Type names []

9.3.2 Ambiguity resolution [dcl.ambig.res]

9.3.3 Meaning of declarators [dcl.meaning] References [dcl.ref] Pointers to members [dcl.mptr] Functions [dcl.fct] Default arguments [dcl.fct.default]

9.4 Initializers [dcl.init]

9.4.2 Character arrays [dcl.init.string]

9.4.4 List-initialization [dcl.init.list]

9.5 Function definitions [dcl.fct.def]

9.5.2 Explicitly-defaulted functions [dcl.fct.def.default]

9.5.3 Deleted definitions [dcl.fct.def.delete]

9.5.4 Coroutine definitions [dcl.fct.def.coroutine]

9.6 Structured binding declarations [dcl.struct.bind]

9.7 Enumerations [enum]

9.7.1 Enumeration declarations [dcl.enum]

9.7.2 The using enum declaration [enum.udecl]

9.8 Namespaces [basic.namespace]

9.8.1 Namespace definition [namespace.def] Unnamed namespaces [namespace.unnamed] Namespace member definitions [namespace.memdef]

9.8.2 Namespace alias [namespace.alias]

9.8.3 Using namespace directive [namespace.udir]

9.9 The using declaration [namespace.udecl]

9.10 The asm declaration [dcl.asm]

9.12 Attributes [dcl.attr]

9.12.1 Attribute syntax and semantics [dcl.attr.grammar]

9.12.2 Alignment specifier [dcl.align]

9.12.3 Carries dependency attribute [dcl.attr.depend]

9.12.4 Deprecated attribute [dcl.attr.deprecated]

9.12.5 Fallthrough attribute [dcl.attr.fallthrough]

9.12.6 Likelihood attributes [dcl.attr.likelihood]

9.12.7 Maybe unused attribute [dcl.attr.unused]

9.12.8 Nodiscard attribute [dcl.attr.nodiscard]

9.12.9 Noreturn attribute [dcl.attr.noreturn]

9.12.10 No unique address attribute [dcl.attr.nouniqueaddr]

10 Modules [module][module]

10.1 Module units and purviews [module.unit]

10.2 Export declaration [module.interface]

10.3 Import declaration [module.import]

10.4 Global module fragment []

10.5 Private module fragment [module.private.frag]

10.6 Instantiation context [module.context]

10.7 Reachability [module.reach]

11 Classes [class][class]

11.1 Preamble [class.pre]

11.2 Properties of classes [class.prop]

11.3 Class names []

11.4 Class members [class.mem]

11.4.1 Member functions [class.mfct]

11.4.2 Non-static member functions [class.mfct.non-static] The this pointer [class.this]

11.4.3 Special member functions [special]

11.4.4 Constructors [class.ctor] Default constructors [class.default.ctor] Copy/move constructors [class.copy.ctor]

11.4.5 Copy/move assignment operator [class.copy.assign]

11.4.6 Destructors [class.dtor]

11.4.7 Conversions [class.conv] Conversion by constructor [class.conv.ctor] Conversion functions [class.conv.fct]

11.4.8 Static members [class.static] Static member functions [class.static.mfct] Static data members []

11.4.9 Bit-fields [class.bit]

11.4.10 Nested class declarations [class.nest]

11.4.11 Nested type names [class.nested.type]

11.6 Local class declarations [class.local]

11.7 Derived classes [class.derived]

11.7.1 Multiple base classes [class.mi]

11.7.2 Virtual functions [class.virtual]

11.7.3 Abstract classes [class.abstract]

11.8 Member name lookup [class.member.lookup]

11.9 Member access control [class.access]

11.9.1 Access specifiers [class.access.spec]

11.9.2 Accessibility of base classes and base class members [class.access.base]

11.9.4 Protected member access [class.protected]

11.9.5 Access to virtual functions [class.access.virt]

11.9.6 Multiple access [class.paths]

11.10 Initialization [class.init]

11.10.1 Explicit initialization [class.expl.init]

11.10.2 Initializing bases and members [class.base.init]

11.10.3 Initialization by inherited constructor [class.inhctor.init]

11.10.4 Construction and destruction [class.cdtor]

11.10.5 Copy/move elision [class.copy.elision]

11.11 Comparisons []

11.11.1 Defaulted comparison operator functions []

11.11.2 Equality operator [class.eq]

11.11.3 Three-way comparison [class.spaceship]

11.11.4 Secondary comparison operators []

11.12 Free store []

12 Overloading [over][over]

12.1 Preamble [over.pre]

12.2 Overloadable declarations [over.load]

12.3 Declaration matching [over.dcl]

12.4 Overload resolution [over.match]

12.4.1 Candidate functions and argument lists [over.match.funcs] Function call syntax [] Call to named function [] Call to object of class type [] Operators in expressions [over.match.oper] Initialization by constructor [over.match.ctor] Copy-initialization of class by user-defined conversion [over.match.copy] Initialization by conversion function [over.match.conv] Initialization by conversion function for direct reference binding [over.match.ref] Initialization by list-initialization [over.match.list] Class template argument deduction [over.match.class.deduct]

12.4.2 Viable functions [over.match.viable]

12.4.3 Best viable function [] Implicit conversion sequences [] Standard conversion sequences [over.ics.scs] User-defined conversion sequences [over.ics.user] Ellipsis conversion sequences [over.ics.ellipsis] Reference binding [over.ics.ref] List-initialization sequence [over.ics.list] Ranking implicit conversion sequences [over.ics.rank]

12.5 Address of overloaded function [over.over]

12.6 Overloaded operators [over.oper]

12.6.1 Unary operators [over.unary]

12.6.2 Binary operators [over.binary] Simple assignment [over.ass]

12.6.3 Function call []

12.6.4 Subscripting [over.sub]

12.6.5 Class member access [over.ref]

12.6.6 Increment and decrement []

12.7 Built-in operators [over.built]

12.8 User-defined literals [over.literal]

13 Templates [temp][temp]

13.1 Preamble [temp.pre]

13.2 Template parameters [temp.param]

13.3 Names of template specializations [temp.names]

13.4 Template arguments [temp.arg]

13.4.1 Template type arguments [temp.arg.type]

13.4.2 Template non-type arguments [temp.arg.nontype]

13.4.3 Template template arguments [temp.arg.template]

13.5 Template constraints [temp.constr]

13.5.1 Constraints [temp.constr.constr] Logical operations [temp.constr.op] Atomic constraints [temp.constr.atomic]

13.5.2 Constrained declarations [temp.constr.decl]

13.5.3 Constraint normalization [temp.constr.normal]

13.5.4 Partial ordering by constraints [temp.constr.order]

13.6 Type equivalence [temp.type]

13.7 Template declarations [temp.decls]

13.7.1 Class templates [temp.class] Member functions of class templates [temp.mem.func] Deduction guides [] Member classes of class templates [temp.mem.class] Static data members of class templates [temp.static] Enumeration members of class templates [temp.mem.enum]

13.7.2 Member templates [temp.mem]

13.7.3 Variadic templates [temp.variadic]

13.7.5 Class template partial specializations [temp.class.spec] Matching of class template partial specializations [temp.class.spec.match] Partial ordering of class template specializations [temp.class.order] Members of class template specializations [temp.class.spec.mfunc]

13.7.6 Function templates [temp.fct] Partial ordering of function templates [temp.func.order]

13.7.7 Alias templates [temp.alias]

13.7.8 Concept definitions [temp.concept]

13.8 Name resolution [temp.res]

13.8.1 Locally declared names [temp.local]

13.8.2 Dependent names [temp.dep] Dependent types [temp.dep.type] Type-dependent expressions [temp.dep.expr] Value-dependent expressions [temp.dep.constexpr] Dependent template arguments [temp.dep.temp]

13.8.3 Non-dependent names [temp.nondep]

13.8.4 Dependent name resolution [temp.dep.res] Point of instantiation [temp.point] Candidate functions [temp.dep.candidate]

13.8.5 Friend names declared within a class template [temp.inject]

13.9 Template instantiation and specialization [temp.spec]

13.9.1 Implicit instantiation [temp.inst]

13.9.2 Explicit instantiation [temp.explicit]

13.9.3 Explicit specialization [temp.expl.spec]

13.10 Function template specializations [temp.fct.spec]

13.10.1 Explicit template argument specification [temp.arg.explicit]

13.10.2 Template argument deduction [temp.deduct] Deducing template arguments from a function call [] Deducing template arguments taking the address of a function template [temp.deduct.funcaddr] Deducing conversion function template arguments [temp.deduct.conv] Deducing template arguments during partial ordering [temp.deduct.partial] Deducing template arguments from a type [temp.deduct.type] Deducing template arguments from a function declaration [temp.deduct.decl]

13.10.3 Overload resolution [temp.over]

14 Exception handling [except][except]

14.2 Throwing an exception [except.throw]

14.3 Constructors and destructors [except.ctor]

14.4 Handling an exception [except.handle]

14.5 Exception specifications [except.spec]

14.6 Special functions [except.special]

14.6.1 The std​::​terminate function [except.terminate]

14.6.2 The std​::​uncaught_­exceptions() function [except.uncaught]

15 Preprocessing directives [cpp][cpp]

15.1 Preamble [cpp.pre]

15.2 Conditional inclusion [cpp.cond]

15.3 Source file inclusion [cpp.include]

15.4 Module directive [cpp.module]

15.5 Header unit importation [cpp.import]

15.6 Macro replacement [cpp.replace]

15.6.1 Argument substitution [cpp.subst]

15.6.2 The # operator [cpp.stringize]

15.6.3 The ## operator [cpp.concat]

15.6.4 Rescanning and further replacement [cpp.rescan]

15.6.5 Scope of macro definitions [cpp.scope]

15.7 Line control [cpp.line]

15.8 Error directive [cpp.error]

15.9 Pragma directive [cpp.pragma]

15.10 Null directive [cpp.null]

15.11 Predefined macro names [cpp.predefined]

15.12 Pragma operator [cpp.pragma.op]

16 Library introduction [library][library]

16.2 The C standard library [library.c]

16.3 Definitions [definitions]

16.4 Method of description [description]

16.4.2 Other conventions [conventions] Exposition-only functions [expos.only.func] Functions within classes [functions.within.classes]

16.5 Library-wide requirements [requirements]

16.5.1 Library contents and organization [organization] Library contents [contents] Freestanding implementations [compliance]

16.5.3 Requirements on types and expressions [utility.requirements] Template argument requirements [utility.arg.requirements] Swappable requirements [swappable.requirements] Cpp17NullablePointer requirements [nullablepointer.requirements] Cpp17Hash requirements [hash.requirements] Cpp17Allocator requirements [allocator.requirements] Allocator completeness requirements [allocator.requirements.completeness]

16.5.4 Constraints on programs [constraints] Namespace use [namespace.constraints] Namespaces for future standardization [namespace.future] Reserved names [reserved.names] External linkage [extern.names] User-defined literal suffixes [usrlit.suffix] Derived classes [derived.classes] Replacement functions [replacement.functions] Handler functions [handler.functions] Function arguments [res.on.arguments] Library object access [res.on.objects] Semantic requirements [res.on.requirements]

16.5.5 Conforming implementations [conforming] Restrictions on macro definitions [res.on.macro.definitions] Non-member functions [global.functions] Member functions [member.functions] Friend functions [hidden.friends] Constexpr functions and constructors [constexpr.functions] Requirements for stable algorithms [algorithm.stable] Data race avoidance [] Protection within classes [protection.within.classes] Derived classes [derivation] Restrictions on exception handling [res.on.exception.handling] Restrictions on storage of pointers [] Value of error codes [] Moved-from state of library types [lib.types.movedfrom]

17 Language support library [support][support]

17.2 Common definitions [support.types]

17.2.1 Header <cstddef> synopsis [cstddef.syn]

17.2.2 Header <cstdlib> synopsis [cstdlib.syn]

17.2.4 Sizes, alignments, and offsets [support.types.layout]

17.2.5 byte type operations [support.types.byteops]

17.3 Implementation properties [support.limits]

17.3.2 Header <version> synopsis [version.syn]

17.3.3 Header <limits> synopsis [limits.syn]

17.3.4 Floating-point type properties [] Type float_­round_­style [] Type float_­denorm_­style []

17.3.5 Class template numeric_­limits [numeric.limits] numeric_­limits members [numeric.limits.members] numeric_­limits specializations [numeric.special]

17.3.6 Header <climits> synopsis [climits.syn]

17.3.7 Header <cfloat> synopsis [cfloat.syn]

17.4 Integer types [cstdint]

17.4.1 Header <cstdint> synopsis [cstdint.syn]

17.5 Startup and termination [support.start.term]

17.6 Dynamic memory management [support.dynamic]

17.6.1 Header <new> synopsis [new.syn]

17.6.2 Storage allocation and deallocation [new.delete] Single-object forms [new.delete.single] Non-allocating forms [new.delete.placement]

17.6.3 Storage allocation errors [alloc.errors] Class bad_­alloc [bad.alloc] Class bad_­array_­new_­length [new.badlength] Type new_­handler [new.handler] set_­new_­handler [] get_­new_­handler []

17.6.4 Pointer optimization barrier [ptr.launder]

17.6.5 Hardware interference size [hardware.interference]

17.7 Type identification [support.rtti]

17.7.1 Header <typeinfo> synopsis [typeinfo.syn]

17.7.2 Class type_­info []

17.7.3 Class bad_­cast [bad.cast]

17.7.4 Class bad_­typeid [bad.typeid]

17.8 Source location [support.srcloc]

17.8.1 Header <source_­location> synopsis [source.location.syn]

17.9 Exception handling [support.exception]

17.9.1 Header <exception> synopsis [exception.syn]

17.9.2 Class exception [exception]

17.9.3 Class bad_­exception [bad.exception]

17.9.4 Abnormal termination [exception.terminate] Type terminate_­handler [terminate.handler] set_­terminate [set.terminate] get_­terminate [get.terminate]

17.9.5 uncaught_­exceptions [uncaught.exceptions]

17.9.6 Exception propagation [propagation]

17.9.7 nested_­exception [except.nested]

17.10 Initializer lists [support.initlist]

17.10.1 Header <initializer_­list> synopsis [initializer.list.syn]

17.10.2 Initializer list constructors [support.initlist.cons]

17.10.3 Initializer list access [support.initlist.access]

17.10.4 Initializer list range access [support.initlist.range]

17.11 Comparisons [cmp]

17.11.1 Header <compare> synopsis [compare.syn]

17.11.2 Comparison category types [cmp.categories] Class partial_­ordering [cmp.partialord] Class weak_­ordering [cmp.weakord] Class strong_­ordering [cmp.strongord]

17.11.3 Class template common_­comparison_­category [cmp.common]

17.11.4 Concept three_­way_­comparable [cmp.concept]

17.11.5 Result of three-way comparison [cmp.result]

17.11.6 Comparison algorithms [cmp.alg]

17.13 Other runtime support [support.runtime]

17.13.1 Header <cstdarg> synopsis [cstdarg.syn]

17.13.2 Header <csetjmp> synopsis [csetjmp.syn]

17.13.3 Header <csignal> synopsis [csignal.syn]

17.13.4 Signal handlers [support.signal]

18 Concepts library [concepts][concepts]

18.2 Equality preservation [concepts.equality]

18.3 Header <concepts> synopsis [concepts.syn]

18.4 Language-related concepts [concepts.lang]

18.4.2 Concept same_­as [concept.same]

18.4.3 Concept derived_­from [concept.derived]

18.4.4 Concept convertible_­to [concept.convertible]

18.4.5 Concept common_­reference_­with [concept.commonref]

18.4.6 Concept common_­with [concept.common]

18.4.7 Arithmetic concepts [concepts.arithmetic]

18.4.8 Concept assignable_­from [concept.assignable]

18.4.9 Concept swappable [concept.swappable]

18.4.10 Concept destructible [concept.destructible]

18.4.11 Concept constructible_­from [concept.constructible]

18.4.12 Concept default_­initializable [concept.default.init]

18.4.13 Concept move_­constructible [concept.moveconstructible]

18.4.14 Concept copy_­constructible [concept.copyconstructible]

18.5 Comparison concepts []

18.5.2 Boolean testability [concept.booleantestable]

18.5.3 Concept equality_­comparable [concept.equalitycomparable]

18.5.4 Concept totally_­ordered [concept.totallyordered]

18.6 Object concepts [concepts.object]

18.7 Callable concepts [concepts.callable]

18.7.2 Concept invocable [concept.invocable]

18.7.3 Concept regular_­invocable [concept.regularinvocable]

18.7.4 Concept predicate [concept.predicate]

18.7.5 Concept relation [concept.relation]

18.7.6 Concept equivalence_­relation [concept.equiv]

18.7.7 Concept strict_­weak_­order [concept.strictweakorder]

19 Diagnostics library [diagnostics][diagnostics]

19.2 Exception classes [std.exceptions]

19.2.1 Header <stdexcept> synopsis [stdexcept.syn]

19.2.2 Class logic_­error [logic.error]

19.2.3 Class domain_­error [domain.error]

19.2.4 Class invalid_­argument [invalid.argument]

19.2.5 Class length_­error [length.error]

19.2.6 Class out_­of_­range [out.of.range]

19.2.7 Class runtime_­error [runtime.error]

19.2.8 Class range_­error [range.error]

19.2.9 Class overflow_­error [overflow.error]

19.2.10 Class underflow_­error [underflow.error]

19.3 Assertions [assertions]

19.3.1 Header <cassert> synopsis [cassert.syn]

19.3.2 The assert macro [assertions.assert]

19.4 Error numbers [errno]

19.4.1 Header <cerrno> synopsis [cerrno.syn]

20 General utilities library [utilities][utilities]

20.2 Utility components [utility]

20.2.1 Header <utility> synopsis [utility.syn]

20.2.4 Forward/move helpers [forward]

20.2.5 Function template as_­const []

20.2.6 Function template declval [declval]

20.2.7 Integer comparison functions [utility.intcmp]

20.3 Compile-time integer sequences [intseq]

20.3.2 Class template integer_­sequence [intseq.intseq]

20.3.3 Alias template make_­integer_­sequence [intseq.make]

20.4 Pairs [pairs]

20.4.2 Class template pair [pairs.pair]

20.4.3 Specialized algorithms [pairs.spec]

20.4.4 Tuple-like access to pair [pair.astuple]

20.4.5 Piecewise construction [pair.piecewise]

20.5 Tuples [tuple]

20.5.2 Header <tuple> synopsis [tuple.syn]

20.5.4 Tuple creation functions [tuple.creation]

20.5.5 Calling a function with a tuple of arguments [tuple.apply]

20.5.6 Tuple helper classes [tuple.helper]

20.5.7 Element access [tuple.elem]

20.5.8 Relational operators [tuple.rel]

20.5.9 Tuple traits [tuple.traits]

20.5.10 Tuple specialized algorithms [tuple.special]

20.6 Optional objects [optional]

20.6.2 Header <optional> synopsis [optional.syn]

20.6.4 No-value state indicator [optional.nullopt]

20.6.5 Class bad_­optional_­access [optional.bad.access]

20.6.6 Relational operators [optional.relops]

20.6.7 Comparison with nullopt [optional.nullops]

20.6.8 Comparison with T [optional.comp.with.t]

20.6.9 Specialized algorithms [optional.specalg]

20.7 Variants [variant]

20.7.2 Header <variant> synopsis [variant.syn]

20.7.4 variant helper classes [variant.helper]

20.7.5 Value access [variant.get]

20.7.6 Relational operators [variant.relops]

20.7.8 Class monostate [variant.monostate]

20.7.9 monostate relational operators [variant.monostate.relops]

20.7.10 Specialized algorithms [variant.specalg]

20.7.11 Class bad_­variant_­access [variant.bad.access]

20.7.12 Hash support [variant.hash]

20.8 Storage for any type [any]

20.8.1 Header <any> synopsis [any.synop]

20.8.2 Class bad_­any_­cast [any.bad.any.cast]

20.8.3 Class any [any.class] Construction and destruction [any.cons]

20.8.4 Non-member functions [any.nonmembers]

20.9 Bitsets [bitset]

20.9.1 Header <bitset> synopsis [bitset.syn]

20.9.2 Class template bitset [template.bitset] Constructors [bitset.cons]

20.9.3 bitset hash support [bitset.hash]

20.9.4 bitset operators [bitset.operators]

20.10 Memory [memory]

20.10.2 Header <memory> synopsis [memory.syn]

20.10.4 Pointer conversion [pointer.conversion]

20.10.6 Pointer alignment [ptr.align]

20.10.7 Allocator argument tag [allocator.tag]

20.10.8 uses_­allocator [allocator.uses] uses_­allocator trait [allocator.uses.trait] Uses-allocator construction []

20.10.12 C library memory allocation [c.malloc]

20.11 Smart pointers [smartptr]

20.11.2 Class bad_­weak_­ptr [util.smartptr.weak.bad]

20.11.5 Class template owner_­less [util.smartptr.ownerless]

20.11.6 Class template enable_­shared_­from_­this [util.smartptr.enab]

20.11.7 Smart pointer hash support [util.smartptr.hash]

20.12 Memory resources [mem.res]

20.12.1 Header <memory_­resource> synopsis [mem.res.syn]

20.12.2 Class memory_­resource [mem.res.class] Public member functions [mem.res.public] Private virtual member functions [mem.res.private]

20.12.4 Access to program-wide memory_­resource objects []

20.12.5 Pool resource classes [mem.res.pool] Classes synchronized_­pool_­resource and unsynchronized_­pool_­resource [mem.res.pool.overview] pool_­options data members [mem.res.pool.options] Constructors and destructors [mem.res.pool.ctor]

20.12.6 Class monotonic_­buffer_­resource [mem.res.monotonic.buffer] Constructors and destructor [mem.res.monotonic.buffer.ctor]

20.13 Class template scoped_­allocator_­adaptor [allocator.adaptor]

20.13.1 Header <scoped_­allocator> synopsis [allocator.adaptor.syn]

20.14 Function objects [function.objects]

20.14.1 Header <functional> synopsis [functional.syn]

20.14.2 Definitions [func.def]

20.14.3 Requirements [func.require]

20.14.4 Function template invoke [func.invoke]

20.14.5 Class template reference_­wrapper [refwrap] Constructors and destructor [refwrap.const] Helper functions [refwrap.helpers]

20.14.7 Comparisons [comparisons] Class template equal_­to [] Class template not_­equal_­to [] Class template greater [comparisons.greater] Class template less [comparisons.less] Class template greater_­equal [comparisons.greater.equal] Class template less_­equal [comparisons.less.equal] Class compare_­three_­way [comparisons.three.way]

20.14.8 Concept-constrained comparisons [range.cmp]

20.14.9 Logical operations [logical.operations] Class template logical_­and [logical.operations.and] Class template logical_­or [logical.operations.or] Class template logical_­not [logical.operations.not]

20.14.10 Bitwise operations [bitwise.operations] Class template bit_­and [bitwise.operations.and] Class template bit_­or [bitwise.operations.or] Class template bit_­xor [bitwise.operations.xor] Class template bit_­not [bitwise.operations.not]

20.14.11 Class identity [func.identity]

20.14.12 Function template not_­fn [func.not.fn]

20.14.13 Function template bind_­front [func.bind.front]

20.14.14 Function object binders [func.bind] Class template is_­bind_­expression [func.bind.isbind] Class template is_­placeholder [func.bind.isplace] Function template bind [func.bind.bind]

20.14.15 Function template mem_­fn [func.memfn]

20.14.16 Polymorphic function wrappers [func.wrap] Class bad_­function_­call [func.wrap.badcall]

20.14.17 Searchers [] Class template default_­searcher [] Class template boyer_­moore_­searcher [] Class template boyer_­moore_­horspool_­searcher []

20.14.18 Class template hash [unord.hash]

20.15 Metaprogramming and type traits [meta]

20.15.1 Requirements [meta.rqmts]

20.15.2 Header <type_­traits> synopsis [meta.type.synop]

20.15.3 Helper classes []

20.15.4 Unary type traits [meta.unary] Primary type categories [] Composite type traits [meta.unary.comp]

20.15.5 Type property queries [meta.unary.prop.query]

20.15.6 Relationships between types [meta.rel]

20.15.7 Transformations between types [meta.trans] Const-volatile modifications [] Reference modifications [meta.trans.ref] Sign modifications [meta.trans.sign] Array modifications [meta.trans.arr] Pointer modifications [meta.trans.ptr] Other transformations [meta.trans.other]

20.15.8 Logical operator traits [meta.logical]

20.15.9 Member relationships [meta.member]

20.15.10 Constant evaluation context [meta.const.eval]

20.16 Compile-time rational arithmetic [ratio]

20.16.2 Header <ratio> synopsis [ratio.syn]

20.16.3 Class template ratio [ratio.ratio]

20.16.4 Arithmetic on ratios [ratio.arithmetic]

20.16.5 Comparison of ratios [ratio.comparison]

20.16.6 SI types for ratio []

20.17 Class type_­index [type.index]

20.17.1 Header <typeindex> synopsis [type.index.synopsis]

20.17.2 type_­index overview [type.index.overview]

20.17.3 type_­index members [type.index.members]

20.18 Execution policies [execpol]

20.18.2 Header <execution> synopsis [execution.syn]

20.18.3 Execution policy type trait [execpol.type]

20.18.4 Sequenced execution policy [execpol.seq]

20.18.5 Parallel execution policy [execpol.par]

20.18.6 Parallel and unsequenced execution policy [execpol.parunseq]

20.18.7 Unsequenced execution policy [execpol.unseq]

20.18.8 Execution policy objects [execpol.objects]

20.19 Primitive numeric conversions [charconv]

20.19.1 Header <charconv> synopsis [charconv.syn]

20.19.2 Primitive numeric output conversion []

20.19.3 Primitive numeric input conversion [charconv.from.chars]

20.20 Formatting [format]

20.20.1 Header <format> synopsis [format.syn]

20.20.2 Format string [format.string] Standard format specifiers [format.string.std]

20.20.4 Formatting functions [format.functions]

20.20.5 Formatter [format.formatter] Formatter requirements [formatter.requirements] Formatter specializations [format.formatter.spec] Class template basic_­format_­parse_­context [format.parse.ctx] Class template basic_­format_­context [format.context]

20.20.6 Arguments [format.arguments] Class template basic_­format_­arg [format.arg] Class template format-arg-store [] Class template basic_­format_­args [format.args]

20.20.7 Class format_­error [format.error]

21 Strings library [strings][strings]

21.2 Character traits [char.traits]

21.2.1 Character traits requirements [char.traits.require]

21.2.3 char_­traits specializations [char.traits.specializations] struct char_­traits<char> [char.traits.specializations.char] struct char_­traits<char8_­t> [char.traits.specializations.char8.t] struct char_­traits<char16_­t> [char.traits.specializations.char16.t] struct char_­traits<char32_­t> [char.traits.specializations.char32.t] struct char_­traits<wchar_­t> [char.traits.specializations.wchar.t]

21.3 String classes [string.classes]

21.3.1 Header <string> synopsis [string.syn]

21.3.2 Class template basic_­string [basic.string] General requirements [string.require] Constructors and assignment operators [string.cons] Iterator support [string.iterators] Element access [string.access] Modifiers [string.modifiers] basic_­string​::​operator+= [string.op.append] basic_­string​::​append [string.append] basic_­string​::​assign [string.assign] basic_­string​::​insert [string.insert] basic_­string​::​erase [string.erase] basic_­string​::​replace [string.replace] basic_­string​::​copy [string.copy] basic_­string​::​swap [string.swap] String operations [string.ops] basic_­string​::​substr [string.substr] basic_­string​::​compare [] basic_­string​::​starts_­with [string.starts.with] basic_­string​::​ends_­with [string.ends.with]

21.3.3 Non-member functions [string.nonmembers] Non-member comparison functions [string.cmp] Inserters and extractors []

21.3.4 Numeric conversions [string.conversions]

21.3.6 Suffix for basic_­string literals [basic.string.literals]

21.4 String view classes [string.view]

21.4.1 Header <string_­view> synopsis [string.view.synop]

21.4.2 Class template basic_­string_­view [string.view.template] Construction and assignment [string.view.cons] String operations [string.view.ops]

21.4.4 Non-member comparison functions [string.view.comparison]

21.4.5 Inserters and extractors []

21.4.7 Suffix for basic_­string_­view literals [string.view.literals]

21.5 Null-terminated sequence utilities [c.strings]

21.5.1 Header <cctype> synopsis [cctype.syn]

21.5.2 Header <cwctype> synopsis [cwctype.syn]

21.5.3 Header <cstring> synopsis [cstring.syn]

21.5.4 Header <cwchar> synopsis [cwchar.syn]

21.5.5 Header <cuchar> synopsis [cuchar.syn]

21.5.6 Multibyte / wide string and character conversion functions [c.mb.wcs]

22 Containers library [containers][containers]

22.2 Container requirements [container.requirements]

22.2.1 General container requirements [container.requirements.general]

22.2.3 Sequence containers [sequence.reqmts]

22.2.6 Associative containers [associative.reqmts] Exception safety guarantees [associative.reqmts.except]

22.2.7 Unordered associative containers [unord.req] Exception safety guarantees [unord.req.except]

22.3 Sequence containers [sequences]

22.3.2 Header <array> synopsis [array.syn]

22.3.3 Header <deque> synopsis [deque.syn]

22.3.4 Header <forward_­list> synopsis [forward.list.syn]

22.3.5 Header <list> synopsis [list.syn]

22.3.6 Header <vector> synopsis [vector.syn]

22.3.7 Class template array [array] Constructors, copy, and assignment [array.cons] Member functions [array.members] Specialized algorithms [array.special] Zero-sized arrays [] Array creation functions [array.creation] Tuple interface [array.tuple]

22.3.8 Class template deque [deque] Constructors, copy, and assignment [deque.cons]

22.3.10 Class template list [list] Constructors, copy, and assignment [list.cons]

22.3.12 Class vector<bool> [vector.bool]

22.4 Associative containers [associative]

22.4.2 Header <map> synopsis []

22.4.3 Header <set> synopsis [associative.set.syn]

22.4.4 Class template map [map] Constructors, copy, and assignment [map.cons] Element access [map.access]

22.4.6 Class template set [set] Constructors, copy, and assignment [set.cons]

22.5 Unordered associative containers [unord]

22.5.2 Header <unordered_­map> synopsis []

22.5.3 Header <unordered_­set> synopsis [unord.set.syn]

22.5.6 Class template unordered_­set [unord.set]

22.6 Container adaptors [container.adaptors]

22.6.2 Header <queue> synopsis [queue.syn]

22.6.3 Header <stack> synopsis [stack.syn]

22.6.4 Class template queue [queue] Constructors [queue.cons] Constructors with allocators [queue.cons.alloc] Specialized algorithms [queue.special]

22.6.5 Class template priority_­queue [priority.queue] Constructors with allocators [priqueue.cons.alloc] Specialized algorithms [priqueue.special]

22.6.6 Class template stack [stack] Constructors [stack.cons] Constructors with allocators [stack.cons.alloc] Specialized algorithms [stack.special]

22.7 Views [views]

22.7.2 Header <span> synopsis [span.syn]

22.7.3 Class template span [views.span] Constructors, copy, and assignment [span.cons] Deduction guides [span.deduct] Element access [span.elem] Iterator support [span.iterators] Views of object representation [span.objectrep]

23 Iterators library [iterators][iterators]

23.2 Header <iterator> synopsis [iterator.synopsis]

23.3 Iterator requirements [iterator.requirements]

23.3.2 Associated types [iterator.assoc.types] Incrementable traits [incrementable.traits] Indirectly readable traits [readable.traits] Iterator traits [iterator.traits]

23.3.3 Customization point objects [iterator.cust] ranges​::​iter_­move [iterator.cust.move] ranges​::​iter_­swap [iterator.cust.swap]

23.3.4 Iterator concepts [iterator.concepts] Concept indirectly_­readable [iterator.concept.readable] Concept indirectly_­writable [iterator.concept.writable] Concept weakly_­incrementable [iterator.concept.winc] Concept incrementable [] Concept input_­or_­output_­iterator [iterator.concept.iterator] Concept sentinel_­for [iterator.concept.sentinel] Concept sized_­sentinel_­for [iterator.concept.sizedsentinel] Concept input_­iterator [iterator.concept.input] Concept output_­iterator [iterator.concept.output] Concept forward_­iterator [iterator.concept.forward] Concept bidirectional_­iterator [iterator.concept.bidir] Concept random_­access_­iterator [iterator.concept.random.access] Concept contiguous_­iterator [iterator.concept.contiguous]

23.3.5 C++17 iterator requirements [iterator.cpp17] Input iterators [input.iterators] Output iterators [output.iterators] Forward iterators [forward.iterators] Bidirectional iterators [bidirectional.iterators] Random access iterators [random.access.iterators]

23.3.6 Indirect callable requirements [indirectcallable] Class template projected [projected]

23.3.7 Common algorithm requirements [alg.req] Concept indirectly_­movable [alg.req.ind.move] Concept indirectly_­copyable [alg.req.ind.copy] Concept indirectly_­swappable [alg.req.ind.swap] Concept indirectly_­comparable [alg.req.ind.cmp] Concept permutable [alg.req.permutable] Concept mergeable [alg.req.mergeable] Concept sortable [alg.req.sortable]

23.4 Iterator primitives [iterator.primitives]

23.4.1 Standard iterator tags [std.iterator.tags]

23.4.2 Iterator operations [iterator.operations]

23.4.3 Range iterator operations [range.iter.ops] ranges​::​advance [range.iter.op.advance] ranges​::​distance [range.iter.op.distance] ranges​::​next [] ranges​::​prev [range.iter.op.prev]

23.5 Iterator adaptors [predef.iterators]

23.5.1 Reverse iterators [reverse.iterators] Class template reverse_­iterator [reverse.iterator] Construction and assignment [reverse.iter.cons] Non-member functions [reverse.iter.nonmember]

23.5.2 Insert iterators [insert.iterators] Class template back_­insert_­iterator [back.insert.iterator] back_­inserter [back.inserter] Class template front_­insert_­iterator [front.insert.iterator] front_­inserter [front.inserter] Class template insert_­iterator [insert.iterator]

23.5.3 Move iterators and sentinels [move.iterators] Class template move_­iterator [move.iterator] Construction and assignment [move.iter.cons] Element access [move.iter.elem] Non-member functions [move.iter.nonmember] Class template move_­sentinel [move.sentinel]

23.5.4 Common iterators [iterators.common] Class template common_­iterator [common.iterator] Associated types [common.iter.types] Constructors and conversions [common.iter.const]

23.5.5 Default sentinels [default.sentinels]

23.5.6 Counted iterators [iterators.counted] Class template counted_­iterator [counted.iterator] Constructors and conversions [counted.iter.const]

23.5.7 Unreachable sentinel [unreachable.sentinels] Class unreachable_­sentinel_­t [unreachable.sentinel]

23.6 Stream iterators [stream.iterators]

23.6.1 Class template istream_­iterator [istream.iterator] Constructors and destructor [istream.iterator.cons]

23.6.2 Class template ostream_­iterator [ostream.iterator] Constructors and destructor [ostream.iterator.cons.des]

23.6.3 Class template istreambuf_­iterator [istreambuf.iterator] Class istreambuf_­iterator​::​proxy [istreambuf.iterator.proxy]

23.6.4 Class template ostreambuf_­iterator [ostreambuf.iterator]

23.7 Range access [iterator.range]

24 Ranges library [ranges][ranges]

24.2 Header <ranges> synopsis [ranges.syn]

24.3 Range access [range.access]

24.3.1 ranges​::​begin [range.access.begin]

24.3.2 ranges​::​end [range.access.end]

24.3.3 ranges​::​cbegin [range.access.cbegin]

24.3.4 ranges​::​cend [range.access.cend]

24.3.5 ranges​::​rbegin [range.access.rbegin]

24.3.6 ranges​::​rend [range.access.rend]

24.3.7 ranges​::​crbegin [range.access.crbegin]

24.3.8 ranges​::​crend [range.access.crend]

24.3.9 ranges​::​size [range.prim.size]

24.3.10 ranges​::​ssize [range.prim.ssize]

24.3.11 ranges​::​empty [range.prim.empty]

24.3.12 ranges​::​data []

24.3.13 ranges​::​cdata [range.prim.cdata]

24.4 Range requirements [range.req]

24.4.3 Sized ranges [range.sized]

24.4.5 Other range refinements [range.refinements]

24.5 Range utilities [range.utility]

24.5.4 Dangling iterator handling [range.dangling]

24.6 Range factories [range.factories]

24.6.1 Empty view [range.empty] Class template empty_­view [range.empty.view]

24.6.2 Single view [range.single] Class template single_­view [range.single.view]

24.6.3 Iota view [range.iota] Class template iota_­view [range.iota.view] Class iota_­view​::​iterator [range.iota.iterator] Class iota_­view​::​sentinel [range.iota.sentinel]

24.6.4 Istream view [range.istream] Class template basic_­istream_­view [range.istream.view] Class template basic_­istream_­view​::​iterator [range.istream.iterator]

24.7 Range adaptors [range.adaptors]

24.7.1 Range adaptor objects [range.adaptor.object]

24.7.2 Semiregular wrapper [range.semi.wrap]

24.7.3 All view [range.all] Class template ref_­view [range.ref.view]

24.7.4 Filter view [range.filter] Class template filter_­view [range.filter.view] Class filter_­view​::​iterator [range.filter.iterator] Class filter_­view​::​sentinel [range.filter.sentinel]

24.7.5 Transform view [range.transform] Class template transform_­view [range.transform.view] Class template transform_­view​::​iterator [range.transform.iterator] Class template transform_­view​::​sentinel [range.transform.sentinel]

24.7.6 Take view [range.take] Class template take_­view [range.take.view] Class template take_­view​::​sentinel [range.take.sentinel]

24.7.7 Take while view [range.take.while] Class template take_­while_­view [range.take.while.view] Class template take_­while_­view​::​sentinel [range.take.while.sentinel]

24.7.8 Drop view [range.drop] Class template drop_­view [range.drop.view]

24.7.9 Drop while view [range.drop.while] Class template drop_­while_­view [range.drop.while.view]

24.7.10 Join view [range.join] Class template join_­view [range.join.view] Class template join_­view​::​iterator [range.join.iterator] Class template join_­view​::​sentinel [range.join.sentinel]

24.7.11 Split view [range.split] Class template split_­view [range.split.view] Class template split_­view​::​outer-iterator [range.split.outer] Class split_­view​::​outer-iterator​::​value_­type [range.split.outer.value] Class template split_­view​::​inner-iterator [range.split.inner]

24.7.15 Elements view [range.elements] Class template elements_­view [range.elements.view] Class template elements_­view​::​iterator [range.elements.iterator] Class template elements_­view​::​sentinel [range.elements.sentinel]

25 Algorithms library [algorithms][algorithms]

25.2 Algorithms requirements [algorithms.requirements]

25.3 Parallel algorithms [algorithms.parallel]

25.3.2 Requirements on user-provided function objects [algorithms.parallel.user]

25.3.3 Effect of execution policies on algorithm execution [algorithms.parallel.exec]

25.3.4 Parallel algorithm exceptions [algorithms.parallel.exceptions]

25.3.5 ExecutionPolicy algorithm overloads [algorithms.parallel.overloads]

25.4 Header <algorithm> synopsis [algorithm.syn]

25.5 Algorithm result types [algorithms.results]

25.8 Sorting and related operations [alg.sorting]

25.8.1 Sorting [alg.sort] stable_­sort [stable.sort] partial_­sort [partial.sort] partial_­sort_­copy [partial.sort.copy] is_­sorted [is.sorted]

25.8.3 Binary search [] lower_­bound [lower.bound] upper_­bound [upper.bound] equal_­range [equal.range] binary_­search []

25.8.6 Set operations on sorted structures [alg.set.operations] set_­union [set.union] set_­intersection [set.intersection] set_­difference [set.difference] set_­symmetric_­difference [set.symmetric.difference]

25.8.8 Minimum and maximum [alg.min.max]

25.8.9 Bounded value [alg.clamp]

25.8.10 Lexicographical comparison [alg.lex.comparison]

25.8.11 Three-way comparison algorithms [alg.three.way]

25.8.12 Permutation generators [alg.permutation.generators]

25.9 Header <numeric> synopsis [numeric.ops.overview]

25.10 Generalized numeric operations [numeric.ops]

25.10.4 Inner product [inner.product]

25.10.5 Transform reduce [transform.reduce]

25.10.7 Exclusive scan [exclusive.scan]

25.10.8 Inclusive scan [inclusive.scan]

25.10.9 Transform exclusive scan [transform.exclusive.scan]

25.10.10 Transform inclusive scan [transform.inclusive.scan]

25.10.11 Adjacent difference [adjacent.difference]

25.10.13 Greatest common divisor [numeric.ops.gcd]

25.10.14 Least common multiple [numeric.ops.lcm]

25.11 Specialized <memory> algorithms [specialized.algorithms]

25.11.1 Special memory concepts [special.mem.concepts]

25.11.2 uninitialized_­default_­construct [uninitialized.construct.default]

25.11.3 uninitialized_­value_­construct [uninitialized.construct.value]

25.11.4 uninitialized_­copy [uninitialized.copy]

25.11.5 uninitialized_­move [uninitialized.move]

25.11.6 uninitialized_­fill [uninitialized.fill]

25.12 C library algorithms [alg.c.library]

26 Numerics library [numerics][numerics]

26.2 Numeric type requirements [numeric.requirements]

26.3 The floating-point environment [cfenv]

26.3.1 Header <cfenv> synopsis [cfenv.syn]

26.4 Complex numbers [complex.numbers]

26.4.1 Header <complex> synopsis [complex.syn]

26.4.2 Class template complex [complex]

26.4.3 Specializations [complex.special]

26.4.4 Member functions [complex.members]

26.4.5 Member operators [complex.member.ops]

26.4.6 Non-member operations [complex.ops]

26.4.7 Value operations [complex.value.ops]

26.4.9 Additional overloads [cmplx.over]

26.4.10 Suffixes for complex number literals [complex.literals]

26.5 Bit manipulation [bit]

26.5.2 Header <bit> synopsis [bit.syn]

26.5.3 Function template bit_­cast [bit.cast]

26.5.4 Integral powers of 2 [bit.pow.two]

26.6 Random number generation [rand]

26.6.1 Header <random> synopsis [rand.synopsis]

26.6.2 Requirements [rand.req] General requirements [rand.req.genl] Seed sequence requirements [rand.req.seedseq] Uniform random bit generator requirements [rand.req.urng] Random number engine requirements [rand.req.eng] Random number engine adaptor requirements [rand.req.adapt] Random number distribution requirements [rand.req.dist]

26.6.3 Random number engine class templates [rand.eng] Class template linear_­congruential_­engine [rand.eng.lcong] Class template mersenne_­twister_­engine [rand.eng.mers] Class template subtract_­with_­carry_­engine [rand.eng.sub]

26.6.4 Random number engine adaptor class templates [rand.adapt] Class template discard_­block_­engine [rand.adapt.disc] Class template independent_­bits_­engine [rand.adapt.ibits] Class template shuffle_­order_­engine [rand.adapt.shuf]

26.6.5 Engines and engine adaptors with predefined parameters [rand.predef]

26.6.6 Class random_­device [rand.device]

26.6.7 Utilities [rand.util] Class seed_­seq [rand.util.seedseq] Function template generate_­canonical [rand.util.canonical]

26.6.8 Random number distribution class templates [rand.dist] Uniform distributions [rand.dist.uni] Class template uniform_­int_­distribution [] Class template uniform_­real_­distribution [rand.dist.uni.real] Bernoulli distributions [rand.dist.bern] Class bernoulli_­distribution [rand.dist.bern.bernoulli] Class template binomial_­distribution [rand.dist.bern.bin] Class template geometric_­distribution [rand.dist.bern.geo] Class template negative_­binomial_­distribution [rand.dist.bern.negbin] Poisson distributions [rand.dist.pois] Class template poisson_­distribution [rand.dist.pois.poisson] Class template exponential_­distribution [rand.dist.pois.exp] Class template gamma_­distribution [rand.dist.pois.gamma] Class template weibull_­distribution [rand.dist.pois.weibull] Class template extreme_­value_­distribution [rand.dist.pois.extreme] Normal distributions [rand.dist.norm] Class template normal_­distribution [rand.dist.norm.normal] Class template lognormal_­distribution [rand.dist.norm.lognormal] Class template chi_­squared_­distribution [rand.dist.norm.chisq] Class template cauchy_­distribution [rand.dist.norm.cauchy] Class template fisher_­f_­distribution [rand.dist.norm.f] Class template student_­t_­distribution [rand.dist.norm.t] Sampling distributions [rand.dist.samp] Class template discrete_­distribution [rand.dist.samp.discrete] Class template piecewise_­constant_­distribution [rand.dist.samp.pconst] Class template piecewise_­linear_­distribution [rand.dist.samp.plinear]

26.6.9 Low-quality random number generation [c.math.rand]

26.7 Numeric arrays [numarray]

26.7.1 Header <valarray> synopsis [valarray.syn]

26.7.3 valarray non-member operations [valarray.nonmembers] Binary operators [valarray.binary] Specialized algorithms [valarray.special]

26.7.10 valarray range access [valarray.range]

26.8 Mathematical functions for floating-point types [c.math]

26.8.1 Header <cmath> synopsis [cmath.syn]

26.8.2 Absolute values [c.math.abs]

26.8.3 Three-dimensional hypotenuse [c.math.hypot3]

26.8.4 Linear interpolation [c.math.lerp]

26.8.5 Classification / comparison functions [c.math.fpclass]

26.8.6 Mathematical special functions [sf.cmath] Associated Laguerre polynomials [sf.cmath.assoc.laguerre] Associated Legendre functions [sf.cmath.assoc.legendre] Complete elliptic integral of the first kind [sf.cmath.comp.ellint.1] Complete elliptic integral of the second kind [sf.cmath.comp.ellint.2] Complete elliptic integral of the third kind [sf.cmath.comp.ellint.3] Regular modified cylindrical Bessel functions [sf.cmath.cyl.bessel.i] Cylindrical Bessel functions of the first kind [sf.cmath.cyl.bessel.j] Irregular modified cylindrical Bessel functions [sf.cmath.cyl.bessel.k] Cylindrical Neumann functions [sf.cmath.cyl.neumann] Incomplete elliptic integral of the first kind [sf.cmath.ellint.1] Incomplete elliptic integral of the second kind [sf.cmath.ellint.2] Incomplete elliptic integral of the third kind [sf.cmath.ellint.3] Exponential integral [sf.cmath.expint] Hermite polynomials [sf.cmath.hermite] Laguerre polynomials [sf.cmath.laguerre] Legendre polynomials [sf.cmath.legendre] Riemann zeta function [sf.cmath.riemann.zeta] Spherical Bessel functions of the first kind [sf.cmath.sph.bessel] Spherical associated Legendre functions [sf.cmath.sph.legendre] Spherical Neumann functions [sf.cmath.sph.neumann]

26.9 Numbers [numbers]

26.9.1 Header <numbers> synopsis [numbers.syn]

26.9.2 Mathematical constants [math.constants]

27 Time library [time][time]

27.2 Header <chrono> synopsis [time.syn]

27.3 Cpp17Clock requirements [time.clock.req]

27.4 Time-related traits [time.traits]

27.4.1 treat_­as_­floating_­point []

27.4.3 Specializations of common_­type [time.traits.specializations]

27.4.4 Class template is_­clock []

27.7 Clocks [time.clock]

27.7.6 Class steady_­clock [time.clock.steady]

27.7.7 Class high_­resolution_­clock [time.clock.hires]

27.7.9 time_­point conversions [time.clock.cast] Class template clock_­time_­conversion [time.clock.conv] Identity conversions [] Conversions between system_­clock and utc_­clock [time.clock.cast.sys.utc] Conversions between system_­clock and other clocks [time.clock.cast.sys] Conversions between utc_­clock and other clocks [time.clock.cast.utc] Function template clock_­cast [time.clock.cast.fn]

27.8 The civil calendar []

27.8.2 Class last_­spec []

27.8.10 Class month_­day_­last []

27.8.18 Conventional syntax operators []

27.9 Class template hh_­mm_­ss [time.hms]

27.10 12/24 hours functions [time.12]

27.11 Time zones []

27.11.2 Time zone database [] Class tzdb_­list [] Time zone database access [] Remote time zone database support []

27.11.3 Exception classes [] Class nonexistent_­local_­time [] Class ambiguous_­local_­time []

27.11.4 Information classes []

27.11.6 Class template zoned_­traits []

27.12 Formatting [time.format]

27.14 Header <ctime> synopsis [ctime.syn]

28 Localization library [localization][localization]

28.2 Header <locale> synopsis [locale.syn]

28.3 Locales [locales]

28.3.1 Class locale [locale] Types [locale.types] Type locale​::​category [locale.category] Class locale​::​facet [locale.facet] Class locale​::​id [] Constructors and destructor [locale.cons] Static members [locale.statics]

28.3.3 Convenience interfaces [locale.convenience] Character classification [classification] Conversions [conversions] Character conversions [conversions.character]

28.4 Standard locale categories [locale.categories]

28.4.3 The numeric punctuation facet [facet.numpunct] Class template numpunct_­byname [locale.numpunct.byname]

28.4.4 The collate category [category.collate] Class template collate_­byname [locale.collate.byname]

28.4.5 The time category [category.time] Class template time_­get_­byname [locale.time.get.byname] Class template time_­put_­byname [locale.time.put.byname]

28.4.7 The message retrieval category [category.messages] Class template messages_­byname [locale.messages.byname]

28.5 C library locales [c.locales]

28.5.1 Header <clocale> synopsis [clocale.syn]

29 Input/output library [input.output][input.output]

29.2 Iostreams requirements [iostreams.requirements]

29.2.2 Positioning type limitations [iostreams.limits.pos]

29.3 Forward declarations [iostream.forward]

29.3.1 Header <iosfwd> synopsis [iosfwd.syn]

29.4 Standard iostream objects [iostream.objects]

29.4.1 Header <iostream> synopsis [iostream.syn]

29.4.3 Narrow stream objects []

29.4.4 Wide stream objects []

29.5 Iostreams base classes [iostreams.base]

29.5.1 Header <ios> synopsis [ios.syn]

29.5.3 Class ios_­base [ios.base] Types [ios.types] Class ios_­base​::​failure [ios.failure] Type ios_­base​::​fmtflags [ios.fmtflags] Type ios_­base​::​iostate [ios.iostate] Type ios_­base​::​openmode [ios.openmode] Type ios_­base​::​seekdir [ios.seekdir] Class ios_­base​::​Init [ios.init] State functions [fmtflags.state] Storage functions [] Constructors and destructor [ios.base.cons]

29.5.4 Class template fpos [fpos]

29.5.5 Class template basic_­ios [ios] Member functions [basic.ios.members] Flags functions [iostate.flags]

29.5.6 ios_­base manipulators [std.ios.manip] fmtflags manipulators [fmtflags.manip] adjustfield manipulators [adjustfield.manip] basefield manipulators [basefield.manip] floatfield manipulators [floatfield.manip]

29.5.7 Error reporting [error.reporting]

29.7 Formatting and manipulators [iostream.format]

29.7.1 Header <istream> synopsis [istream.syn]

29.7.2 Header <ostream> synopsis [ostream.syn]

29.7.3 Header <iomanip> synopsis [iomanip.syn]

29.7.4 Input streams [input.streams] Class template basic_­istream [istream] Assignment and swap [istream.assign] Class basic_­istream​::​sentry [istream.sentry] Formatted input functions [istream.formatted] basic_­istream​::​operator>> [istream.extractors] Unformatted input functions [istream.unformatted] Standard basic_­istream manipulators [istream.manip] Rvalue stream extraction [istream.rvalue] Class template basic_­iostream [iostreamclass] Assignment and swap [iostream.assign]

29.7.5 Output streams [output.streams] Class template basic_­ostream [ostream] Assignment and swap [ostream.assign] Class basic_­ostream​::​sentry [ostream.sentry] Formatted output functions [ostream.formatted] basic_­ostream​::​operator<< [ostream.inserters] Character inserter function templates [ostream.inserters.character] Unformatted output functions [ostream.unformatted] Standard manipulators [ostream.manip] Rvalue stream insertion [ostream.rvalue]

29.7.6 Standard manipulators [std.manip]

29.7.7 Extended manipulators [ext.manip]

29.7.8 Quoted manipulators [quoted.manip]

29.8 String-based streams [string.streams]

29.8.1 Header <sstream> synopsis [sstream.syn]

29.8.2 Class template basic_­stringbuf [stringbuf] Assignment and swap [stringbuf.assign] Member functions [stringbuf.members] Overridden virtual functions [stringbuf.virtuals]

29.8.3 Class template basic_­istringstream [istringstream] Assignment and swap [istringstream.assign]

29.8.4 Class template basic_­ostringstream [ostringstream] Assignment and swap [ostringstream.assign]

29.8.5 Class template basic_­stringstream [stringstream] Assignment and swap [stringstream.assign]

29.9 File-based streams [file.streams]

29.9.1 Header <fstream> synopsis [fstream.syn]

29.9.2 Class template basic_­filebuf [filebuf] Assignment and swap [filebuf.assign] Member functions [filebuf.members] Overridden virtual functions [filebuf.virtuals]

29.9.3 Class template basic_­ifstream [ifstream] Assignment and swap [ifstream.assign] Member functions [ifstream.members]

29.9.4 Class template basic_­ofstream [ofstream] Assignment and swap [ofstream.assign] Member functions [ofstream.members]

29.9.5 Class template basic_­fstream [fstream] Assignment and swap [fstream.assign] Member functions [fstream.members]

29.10 Synchronized output streams [syncstream]

29.10.1 Header <syncstream> synopsis [syncstream.syn]

29.10.2 Class template basic_­syncbuf [syncstream.syncbuf] Construction and destruction [syncstream.syncbuf.cons] Overridden virtual functions [syncstream.syncbuf.virtuals]

29.11 File systems [filesystems]

29.11.2 Conformance [fs.conformance] POSIX conformance [fs.conform.9945] Operating system dependent behavior conformance [fs.conform.os] File system race behavior [fs.race.behavior]

29.11.3 Normative references [fs.norm.ref]

29.11.4 Requirements [fs.req] Namespaces and headers [fs.req.namespace]

29.11.5 Header <filesystem> synopsis [fs.filesystem.syn]

29.11.6 Error reporting []

29.11.9 Enumerations [fs.enum] Enum path​::​format [fs.enum.path.format] Enum class file_­type [fs.enum.file.type] Enum class copy_­options [fs.enum.copy.opts] Enum class perms [fs.enum.perms] Enum class perm_­options [fs.enum.perm.opts] Enum class directory_­options [fs.enum.dir.opts]

29.11.13 Class recursive_­directory_­iterator [fs.class.rec.dir.itr]

29.11.14 Filesystem operation functions [fs.op.funcs] Create directory symlink [fs.op.create.dir.symlk] Temporary directory path [fs.op.temp.dir.path]

29.12 C library files [c.files]

29.12.1 Header <cstdio> synopsis [cstdio.syn]

29.12.2 Header <cinttypes> synopsis [cinttypes.syn]

30 Regular expressions library [re][re]

30.2 Definitions [re.def]

30.3 Requirements [re.req]

30.4 Header <regex> synopsis [re.syn]

30.5 Namespace std​::​regex_­constants [re.const]

30.5.1 Bitmask type syntax_­option_­type [re.synopt]

30.5.2 Bitmask type match_­flag_­type [re.matchflag]

30.5.3 Implementation-defined error_­type [re.err]

30.6 Class regex_­error [re.badexp]

30.7 Class template regex_­traits [re.traits]

30.8 Class template basic_­regex [re.regex]

30.8.3 Constant operations [re.regex.operations]

30.8.6 Non-member functions [re.regex.nonmemb]

30.9 Class template sub_­match [re.submatch]

30.9.2 Non-member operators [re.submatch.op]

30.11 Regular expression algorithms [re.alg]

30.11.1 Exceptions [re.except]

30.11.2 regex_­match [re.alg.match]

30.11.3 regex_­search []

30.11.4 regex_­replace [re.alg.replace]

30.12 Regular expression iterators [re.iter]

30.12.1 Class template regex_­iterator [re.regiter]

30.12.2 Class template regex_­token_­iterator [re.tokiter]

30.13 Modified ECMAScript regular expression grammar [re.grammar]

31 Atomic operations library [atomics][atomics]

31.2 Header <atomic> synopsis [atomics.syn]

31.3 Type aliases [atomics.alias]

31.4 Order and consistency [atomics.order]

31.5 Lock-free property [atomics.lockfree]

31.6 Waiting and notifying [atomics.wait]

31.7 Class template atomic_­ref [atomics.ref.generic]

31.7.2 Specializations for integral types []

31.7.3 Specializations for floating-point types [atomics.ref.float]

31.7.4 Partial specialization for pointers [atomics.ref.pointer]

31.7.5 Member operators common to integers and pointers to objects [atomics.ref.memop]

31.8 Class template atomic [atomics.types.generic]

31.8.1 Operations on atomic types [atomics.types.operations]

31.8.2 Specializations for integers []

31.8.3 Specializations for floating-point types [atomics.types.float]

31.8.4 Partial specialization for pointers [atomics.types.pointer]

31.8.5 Member operators common to integers and pointers to objects [atomics.types.memop]

31.8.6 Partial specializations for smart pointers [util.smartptr.atomic] Partial specialization for shared_­ptr [util.smartptr.atomic.shared] Partial specialization for weak_­ptr [util.smartptr.atomic.weak]

31.9 Non-member functions [atomics.nonmembers]

31.10 Flag type and operations [atomics.flag]

32 Thread support library [thread][thread]

32.2 Requirements [thread.req]

32.2.1 Template parameter names [thread.req.paramname]

32.2.4 Timing specifications [thread.req.timing]

32.2.5 Requirements for Cpp17Lockable types [thread.req.lockable] Cpp17BasicLockable requirements [thread.req.lockable.basic] Cpp17Lockable requirements [thread.req.lockable.req] Cpp17TimedLockable requirements [thread.req.lockable.timed]

32.3 Stop tokens [thread.stoptoken]

32.3.2 Header <stop_­token> synopsis [thread.stoptoken.syn]

32.3.3 Class stop_­token [stoptoken] Constructors, copy, and assignment [stoptoken.cons] Non-member functions [stoptoken.nonmembers]

32.3.4 Class stop_­source [stopsource] Constructors, copy, and assignment [stopsource.cons] Non-member functions [stopsource.nonmembers]

32.3.5 Class template stop_­callback [stopcallback] Constructors and destructor [stopcallback.cons]

32.5 Mutual exclusion [thread.mutex]

32.5.1 Header <mutex> synopsis [mutex.syn]

32.5.2 Header <shared_­mutex> synopsis [shared.mutex.syn]

32.5.5 Generic locking algorithms [thread.lock.algorithm]

32.5.6 Call once [thread.once] Struct once_­flag [thread.once.onceflag] Function call_­once [thread.once.callonce]

32.6 Condition variables [thread.condition]

32.6.1 Header <condition_­variable> synopsis [condition.variable.syn]

32.6.3 Class condition_­variable [thread.condition.condvar]

32.6.4 Class condition_­variable_­any [thread.condition.condvarany] Noninterruptible waits [thread.condvarany.wait]

32.7 Semaphore [thread.sema]

32.7.1 Header <semaphore> synopsis [semaphore.syn]

32.7.2 Class template counting_­semaphore [thread.sema.cnt]

32.8 Coordination types [thread.coord]

32.8.1 Latches [thread.latch] Header <latch> synopsis [latch.syn]

32.8.2 Barriers [thread.barrier] Header <barrier> synopsis [barrier.syn] Class template barrier [thread.barrier.class]

32.9 Futures [futures]

32.9.2 Header <future> synopsis [future.syn]

32.9.3 Error handling [futures.errors]

32.9.4 Class future_­error [futures.future.error]

32.9.5 Shared state [futures.state]

32.9.6 Class template promise [futures.promise]

32.9.7 Class template future [futures.unique.future]

32.9.8 Class template shared_­future [futures.shared.future]

32.9.9 Function template async [futures.async]

32.9.10 Class template packaged_­task [futures.task]

Annex A (informative) Grammar summary [gram][gram]

A.1 Keywords [gram.key]

A.2 Lexical conventions [gram.lex]

A.4 Expressions [gram.expr]

A.5 Statements [gram.stmt]

A.6 Declarations [gram.dcl]

A.9 Overloading [gram.over]

A.10 Templates [gram.temp]

A.11 Exception handling [gram.except]

A.12 Preprocessing directives [gram.cpp]

Annex B (informative) Implementation quantities [implimits][implimits]

Annex C (informative) Compatibility [diff][diff]

C.5 C++ and ISO C [diff.iso]

C.5.1 [lex]: lexical conventions [diff.lex]

C.5.3 [expr]: expressions [diff.expr]

C.5.5 [dcl.dcl]: declarations [diff.dcl]

C.5.7 [cpp]: preprocessing directives [diff.cpp]

C.6 C standard library [diff.library]

C.6.1 Modifications to headers []

C.6.2 Modifications to definitions []

C.6.2.1 Types char16_­t and char32_­t [diff.char16]

C.6.2.2 Type wchar_­t [diff.wchar.t]

C.6.2.5 Header <stdalign.h> [diff.header.stdalign.h]

C.6.2.6 Header <stdbool.h> [diff.header.stdbool.h]

C.6.2.7 Macro NULL [diff.null]

C.6.3 Modifications to declarations []

C.6.4 Modifications to behavior []

C.6.4.1 Macro offsetof(type, member-designator) [diff.offsetof]

C.6.4.2 Memory allocation functions [diff.malloc]

Annex D (normative) Compatibility features [depr][depr]

D.1 Arithmetic conversion on enumerations [depr.arith.conv.enum]

D.2 Implicit capture of *this by reference [depr.capture.this]

D.3 Comma operator in subscript expressions [depr.comma.subscript]

D.4 Array comparisons [depr.array.comp]

D.5 Deprecated volatile types [depr.volatile.type]

D.6 Redeclaration of static constexpr data members [depr.static.constexpr]

D.7 Non-local use of TU-local entities [depr.local]

D.8 Implicit declaration of copy functions [depr.impldec]

D.9 C headers [depr.c.headers]

D.9.1 Header <complex.h> synopsis [depr.complex.h.syn]

D.9.2 Header <iso646.h> synopsis [depr.iso646.h.syn]

D.9.3 Header <stdalign.h> synopsis [depr.stdalign.h.syn]

D.9.4 Header <stdbool.h> synopsis [depr.stdbool.h.syn]

D.9.5 Header <tgmath.h> synopsis [depr.tgmath.h.syn]

D.10 Requires paragraph [depr.res.on.required]

D.11 Relational operators [depr.relops]

D.12 char* streams [depr.str.strstreams]

D.12.1 Header <strstream> synopsis [depr.strstream.syn]

D.12.2 Class strstreambuf [depr.strstreambuf]

D.12.2.1 strstreambuf constructors [depr.strstreambuf.cons]

D.12.2.3 strstreambuf overridden virtual functions [depr.strstreambuf.virtuals]

D.12.3 Class istrstream [depr.istrstream]

D.12.3.1 istrstream constructors [depr.istrstream.cons]

D.12.4 Class ostrstream [depr.ostrstream]

D.12.4.1 ostrstream constructors [depr.ostrstream.cons]

D.12.5 Class strstream [depr.strstream]

D.12.5.1 strstream constructors [depr.strstream.cons]

D.12.5.2 strstream destructor [depr.strstream.dest]

D.12.5.3 strstream operations [depr.strstream.oper]

D.13 Deprecated type traits [depr.meta.types]

D.16 Deprecated iterator primitives [depr.iterator.primitives]

D.17 Deprecated move_­iterator access [depr.move.iter.elem]

D.18 Deprecated shared_­ptr atomic access [depr.util.smartptr.shared.atomic]

D.19 Deprecated basic_­string capacity [depr.string.capacity]

D.20 Deprecated standard code conversion facets [depr.locale.stdcvt]

D.20.1 Header <codecvt> synopsis [depr.codecvt.syn]

D.21 Deprecated convenience conversion interfaces [depr.conversions]

D.21.1 Class template wstring_­convert [depr.conversions.string]

D.21.2 Class template wbuffer_­convert [depr.conversions.buffer]

D.22 Deprecated locale category facets [depr.locale.category]

D.23 Deprecated filesystem path factory functions [depr.fs.path.factory]

D.24 Deprecated atomic operations [depr.atomics]

D.24.2 Non-member functions [depr.atomics.nonmembers]

D.24.3 Operations on atomic types [depr.atomics.types.operations]

D.24.4 Flag type and operations [depr.atomics.flag]


Index of library headers

Index of library names

Index of library concepts

Index of implementation-defined behavior