3 Terms and definitions [intro.defs] (original) (raw)
For the purposes of this document, the terms and definitions given in ISO/IEC 2382, the terms, definitions, and symbols given in ISO 80000-2:2009, and the following apply.
Terms that are used only in a small portion of this document are defined where they are used and italicized where they are defined.
3.1[defns.access]access
⟨execution-time action⟩ read or modify the value of an object
[Note 1:
Only objects of scalar type can be accessed.
Attempts to read or modify an object of class type typically invoke a constructoror assignment operator; such invocations do not themselves constitute accesses, although they may involve accesses of scalar subobjects.
— _end note_]
3.2[defns.arbitrary.stream]arbitrary-positional stream
⟨library⟩stream that can seek to any integral position within the length of the stream
[Note 1:
Every arbitrary-positional stream is also a repositional stream ([defns.repositional.stream]).
— _end note_]
3.3[defns.argument]argument
⟨function call expression⟩ expression in the comma-separated list bounded by the parentheses
3.4[defns.argument.macro]argument
⟨function-like macro⟩ sequence of preprocessing tokens in the comma-separated list bounded by the parentheses
3.7[defns.block]block
⟨execution⟩ wait for some condition (other than for the implementation to execute the execution steps of the thread of execution) to be satisfied before continuing execution past the blocking operation
3.9[defns.character]character
⟨library⟩ object which, when treated sequentially, can represent text
3.10[defns.character.container]character container type
⟨library⟩class or a type used to represent a character
[Note 1:
It is used for one of the template parameters of the string, iostream, and regular expression class templates.
— _end note_]
3.12[defns.component]component
⟨library⟩group of library entities directly related as members, parameters, or return types
[Note 1:
For example, the class templatebasic_stringand the non-member function templates that operate on strings are referred to as thestring component.
— _end note_]
3.13[defns.cond.supp]conditionally-supported
program construct that an implementation is not required to support
[Note 1:
Each implementation documents all conditionally-supported constructs that it does not support.
— _end note_]
3.15[defns.deadlock]deadlock
⟨library⟩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
3.16[defns.default.behavior.impl]default behavior
⟨library implementation⟩ specific behavior provided by the implementation, within the scope of the required behavior
3.17[defns.diagnostic]diagnostic message
message belonging to an implementation-defined subset of the implementation's output messages
3.19[defns.dynamic.type]dynamic type
⟨glvalue⟩ type of the most derived object to which the glvalue refers
[Example 1:
If a pointer p whose static type is “pointer to class B” is pointing to an object of class D,derivedfrom B, the dynamic type of the expression *p is “D”.
— _end example_]
3.21[defns.expression-equivalent]expression-equivalent
⟨library⟩expressions that all have the same effects, either are all potentially-throwing or are all not potentially-throwing, and either are all constant subexpressions or are all not constant subexpressions
[Example 1:
For a value x of type intand a function f that accepts integer arguments, the expressionsf(x + 2),f(2 + x), andf(1 + x + 1)are expression-equivalent.
— _end example_]
3.22[defns.regex.finite.state.machine]finite state machine
⟨regular expression⟩unspecified data structure that is used to represent a regular expression, and which permits efficient matches against the regular expression to be obtained
3.23[defns.regex.format.specifier]format specifier
⟨regular expression⟩sequence of one or more characters that is to be replaced with some part of a regular expression match
3.24[defns.handler]handler function
⟨library⟩non-reserved function whose definition may be provided by a C++ program
[Note 1:
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 ([support]).
— _end note_]
3.26[defns.impl.defined]implementation-defined behavior
behavior, for a well-formed program construct and correct data, that depends on the implementation and that each implementation documents
3.27[defns.order.ptr]implementation-defined strict total order over pointers
⟨library⟩implementation-defined strict total ordering over all pointer values such that the ordering is consistent with the partial order imposed by the builtin operators<, >, <=, >=, and <=>
3.29[defns.iostream.templates]iostream class templates
⟨library⟩ templates that are declared in header and take two template arguments
[Note 1:
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 charTnecessary to implement the iostream class templates.
— _end note_]
3.30[defns.locale.specific]locale-specific behavior
behavior that depends on local conventions of nationality, culture, and language that each implementation documents
3.31[defns.regex.matched]matched
⟨regular expression⟩condition when a sequence of zero or more characters correspond to a sequence of characters defined by the pattern
3.32[defns.modifier]modifier function
⟨library⟩class member function other than a constructor, assignment operator, or destructor that alters the state of an object of the class
3.33[defns.move.assign]move assignment
⟨library⟩assignment of an rvalue of some object type to a modifiable lvalue of the same type
3.34[defns.move.constr]move construction
⟨library⟩direct-initialization of an object of some type with an rvalue of the same type
3.35[defns.multibyte]multibyte character
sequence of one or more bytes representing a member of the extended character set of either the source or the execution environment
[Note 1:
The extended character set is a superset of the basic character set ([lex.charset]).
— _end note_]
3.36[defns.ntcts]NTCTS
⟨library⟩sequence of values that have character type that precede the terminating null character type valuecharT()
3.37[defns.observer]observer function
⟨library⟩class member function that accesses the state of an object of the class but does not alter that state
[Note 1:
Observer functions are specified asconstmember functions ([class.this]).
— _end note_]
3.38[defns.parameter]parameter
⟨function or catch clause⟩ object or reference declared as part of a function declaration or definition or in the catch clause of an exception handler that acquires a value on entry to the function or handler
3.39[defns.parameter.macro]parameter
⟨function-like macro⟩ identifier from the comma-separated list bounded by the parentheses immediately following the macro name
3.41[defns.regex.primary.equivalence.class]primary equivalence class
⟨regular expression⟩set of one or more characters which share the same primary sort key: that is the sort key weighting that depends only upon character shape, and not accents, case, or locale specific tailorings
3.42[defns.prog.def.spec]program-defined specialization
⟨library⟩explicit template specialization or partial specialization that is not part of the C++ standard library and not defined by the implementation
3.43[defns.prog.def.type]program-defined type
⟨library⟩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 1:
Types defined by the implementation include extensions ([intro.compliance]) and internal types used by the library.
— _end note_]
3.44[defns.projection]projection
⟨library⟩ transformation that an algorithm applies before inspecting the values of elements
[Example 1:
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_]
3.45[defns.referenceable]referenceable type
type that is either an object type, a function type that does not have cv-qualifiers or aref-qualifier, or a reference type
[Note 1:
The term describes a type to which a reference can be created, including reference types.
— _end note_]
3.47[defns.replacement]replacement function
⟨library⟩non-reserved function whose definition is provided by a C++ program
[Note 1:
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_]
3.49[defns.required.behavior]required behavior
⟨library⟩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 1:
If such a function defined in a C++ program fails to meet the required behavior when it executes, the behavior is undefined.
— _end note_]
3.50[defns.reserved.function]reserved function
⟨library⟩function, specified as part of the C++ standard library, that is defined by the implementation
[Note 1:
If a C++ program provides a definition for any reserved function, the results are undefined.
— _end note_]
3.51[defns.signature]signature
⟨function⟩ name, parameter-type-list, and enclosing namespace (if any)
[Note 1:
Signatures are used as a basis for name mangling and linking.
— _end note_]
3.55[defns.signature.spec]signature
⟨function template specialization⟩ signature of the template of which it is a specialization and its template arguments (whether explicitly specified or deduced)
3.58[defns.signature.member.spec]signature
⟨class member function template specialization⟩ signature of the member function template of which it is a specialization and its template arguments (whether explicitly specified or deduced)
3.59[defns.stable]stable algorithm
⟨library⟩algorithm that preserves, as appropriate to the particular algorithm, the order of elements
3.60[defns.static.type]static type
type of an expression resulting from analysis of the program without considering execution semantics
[Note 1:
The static type of an expression depends only on the form of the program in which the expression appears, and does not change while the program is executing.
— _end note_]
3.62[defns.traits]traits class
⟨library⟩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
3.63[defns.unblock]unblock
satisfy a condition that one or more blocked threads of execution are waiting for
3.64[defns.undefined]undefined behavior
behavior for which this document imposes no requirements
[Note 1:
Undefined behavior may be expected when this document omits any explicit definition of behavior or when a program uses an erroneous construct or erroneous data.
Permissible undefined behavior ranges from ignoring the situation completely with unpredictable results, to behaving during translation or program execution in a documented manner characteristic of the environment (with or without the issuance of a diagnostic message), to terminating a translation or execution (with the issuance of a diagnostic message).
Many erroneous program constructs do not engender undefined behavior; they are required to be diagnosed.
Evaluation of a constant expression ([expr.const]) never exhibits behavior explicitly specified as undefined in [intro] through [cpp].
— _end note_]
3.65[defns.unspecified]unspecified behavior
behavior, for a well-formed program construct and correct data, that depends on the implementation
[Note 1:
The implementation is not required to document which behavior occurs.
The range of possible behaviors is usually delineated by this document.
— _end note_]
3.66[defns.valid]valid but unspecified state
⟨library⟩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 1:
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() returnsfalse.
— _end example_]
3.67[defns.well.formed]well-formed program
C++ program constructed according to the syntax rules, diagnosable semantic rules, and the one-definition rule