16 Library introduction [library]

16.3 Definitions [definitions]

Note
:
[intro.defs] defines additional terms used elsewhere in this document.
— end note
 ]

16.3.1[defns.arbitrary.stream]arbitrary-positional stream

stream (described in [input.output]) that can seek to any integral position within the length of the stream
Note
:
Every arbitrary-positional stream is also a repositional stream.
— end note
 ]

16.3.2[defns.character]character

[strings], [localization], [input.output], and [re]⟩ object which, when treated sequentially, can represent text
Note
:
The term does not mean only char, char8_­t, char16_­t, char32_­t, and wchar_­t objects, but any value that can be represented by a type that provides the definitions specified in these Clauses.
— end note
 ]

16.3.3[defns.character.container]character container type

class or a type used to represent a character
Note
:
It is used for one of the template parameters of the string, iostream, and regular expression class templates.
— end note
 ]

16.3.4[defns.comparison]comparison function

operator function for any of the equality or relational operators

16.3.5[defns.component]component

group of library entities directly related as members, parameters, or return types
Note
:
For example, the class template basic_­string and the non-member function templates that operate on strings are referred to as the string component.
— end note
 ]

16.3.6[defns.const.subexpr]constant subexpression

expression whose evaluation as subexpression of a conditional-expression CE ([expr.cond]) would not prevent CE from being a core constant expression

16.3.7[defns.deadlock]deadlock

situation wherein one or more threads are unable to continue execution because each is blocked waiting for one or more of the others to satisfy some condition

16.3.8[defns.default.behavior.impl]default behavior

⟨implementation⟩ specific behavior provided by the implementation, within the scope of the required behavior

16.3.9[defns.default.behavior.func]default behavior

⟨specification⟩ description of replacement function and handler function semantics

16.3.10[defns.direct-non-list-init]direct-non-list-initialization

16.3.11[defns.expression-equivalent]expression-equivalent

expressions that all have the same effects, either are all potentially-throwing ([except.spec]) or are all not potentially-throwing, and either are all constant subexpressions or are all not constant subexpressions
Example
:
For a value x of type int and a function f that accepts integer arguments, the expressions f(x + 2), f(2 + x), and f(1 + x + 1) are expression-equivalent.
— end example
 ]

16.3.12[defns.handler]handler function

non-reserved function whose definition may be provided by a C++ program
Note
:
A C++ program may designate a handler function at various points in its execution by supplying a pointer to the function when calling any of the library functions that install handler functions ([language.support]).
— end note
 ]

16.3.13[defns.iostream.templates]iostream class templates

templates, defined in [input.output], that take two template arguments
Note
:
The arguments are named charT and traits.
The argument charT is a character container class, and the argument traits is a class which defines additional characteristics and functions of the character type represented by charT necessary to implement the iostream class templates.
— end note
 ]

16.3.14[defns.modifier]modifier function

class member function other than a constructor, assignment operator, or destructor that alters the state of an object of the class

16.3.15[defns.move.assign]move assignment

assignment of an rvalue of some object type to a modifiable lvalue of the same type

16.3.16[defns.move.constr]move construction

direct-initialization of an object of some type with an rvalue of the same type

16.3.17[defns.ntcts]NTCTS

sequence of values that have character type that precede the terminating null character type value charT()

16.3.18[defns.observer]observer function

class member function that accesses the state of an object of the class but does not alter that state
Note
:
Observer functions are specified as const member functions ([class.this]).
— end note
 ]

16.3.19[defns.prog.def.spec]program-defined specialization

explicit template specialization or partial specialization that is not part of the C++ standard library and not defined by the implementation

16.3.20[defns.prog.def.type]program-defined type

non-closure class type or enumeration type that is not part of the C++ standard library and not defined by the implementation, or a closure type of a non-implementation-provided lambda expression, or an instantiation of a program-defined specialization
Note
:
Types defined by the implementation include extensions ([intro.compliance]) and internal types used by the library.
— end note
 ]

16.3.21[defns.projection]projection

⟨function object argument⟩ transformation that an algorithm applies before inspecting the values of elements
Example
:
std::pair<int, std::string_view> pairs[] = {{2, "foo"}, {1, "bar"}, {0, "baz"}};
std::ranges::sort(pairs, std::ranges::less{}, [](auto const& p) { return p.first; });
sorts the pairs in increasing order of their first members:
{{0, "baz"}, {1, "bar"}, {2, "foo"}}
— end example
 ]

16.3.22[defns.referenceable]referenceable type

type that is either an object type, a function type that does not have cv-qualifiers or a ref-qualifier, or a reference type
Note
:
The term describes a type to which a reference can be created, including reference types.
— end note
 ]

16.3.23[defns.replacement]replacement function

non-reserved function whose definition is provided by a C++ program
Note
:
Only one definition for such a function is in effect for the duration of the program's execution, as the result of creating the program ([lex.phases]) and resolving the definitions of all translation units ([basic.link]).
— end note
 ]

16.3.24[defns.repositional.stream]repositional stream

stream (described in [input.output]) that can seek to a position that was previously encountered

16.3.25[defns.required.behavior]required behavior

description of replacement function and handler function semantics applicable to both the behavior provided by the implementation and the behavior of any such function definition in the program
Note
:
If such a function defined in a C++ program fails to meet the required behavior when it executes, the behavior is undefined.
— end note
 ]

16.3.26[defns.reserved.function]reserved function

function, specified as part of the C++ standard library, that is defined by the implementation
Note
:
If a C++ program provides a definition for any reserved function, the results are undefined.
— end note
 ]

16.3.27[defns.stable]stable algorithm

algorithm that preserves, as appropriate to the particular algorithm, the order of elements
Note
:
Requirements for stable algorithms are given in [algorithm.stable].
— end note
 ]

16.3.28[defns.traits]traits class

class that encapsulates a set of types and functions necessary for class templates and function templates to manipulate objects of types for which they are instantiated

16.3.29[defns.valid]valid but unspecified state

value of an object that is not specified except that the object's invariants are met and operations on the object behave as specified for its type
Example
:
If an object x of type std​::​vector<int> is in a valid but unspecified state, x.empty() can be called unconditionally, and x.front() can be called only if x.empty() returns false.
— end example
 ]