GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing eel.is — [library] 16 Library introduction [library]16.1 General [library.general]16.2 The C standard library [library.c]16.3 Method of description [description]16.3.1 General [description.general]16.3.2 Structure of each clause [structure]16.3.2.1 Elements [structure.elements]16.3.2.2 Summary [structure.summary]16.3.2.3 Requirements [structure.requirements]16.3.2.4 Detailed specifications [structure.specifications]16.3.2.5 C library [structure.see.also]16.3.3 Other conventions [conventions]16.3.3.1 General [conventions.general]16.3.3.2 Exposition-only entities, etc. [expos.only.entity]16.3.3.3 Type descriptions [type.descriptions]16.3.3.3.1 General [type.descriptions.general]16.3.3.3.2 Enumerated types [enumerated.types]16.3.3.3.3 Bitmask types [bitmask.types]16.3.3.3.4 Character sequences [character.seq]16.3.3.3.4.1 General [character.seq.general]16.3.3.3.4.2 Byte strings [byte.strings]16.3.3.3.4.3 Multibyte strings [multibyte.strings]16.3.3.3.5 Customization Point Object types [customization.point.object]16.3.3.4 Algorithm function objects [alg.func.obj]16.3.3.5 Functions within classes [functions.within.classes]16.3.3.6 Private members [objects.within.classes]16.3.3.7 Freestanding items [freestanding.item]16.4 Library-wide requirements [requirements]16.4.1 General [requirements.general]16.4.2 Library contents and organization [organization]16.4.2.1 General [organization.general]16.4.2.2 Library contents [contents]16.4.2.3 Headers [headers]16.4.2.4 Modules [std.modules]16.4.2.5 Freestanding implementations [compliance]16.4.3 Using the library [using]16.4.3.1 Overview [using.overview]16.4.3.2 Headers [using.headers]16.4.3.3 Linkage [using.linkage]16.4.4 Requirements on types and expressions [utility.requirements]16.4.4.1 General [utility.requirements.general]16.4.4.2 Template argument requirements [utility.arg.requirements]16.4.4.3 Swappable requirements [swappable.requirements]16.4.4.4 Cpp17NullablePointer requirements [nullablepointer.requirements]16.4.4.5 Cpp17Hash requirements [hash.requirements]16.4.4.6 Cpp17Allocator requirements [allocator.requirements]16.4.4.6.1 General [allocator.requirements.general]16.4.4.6.2 Allocator completeness requirements [allocator.requirements.completeness]16.4.5 Constraints on programs [constraints]16.4.5.1 Overview [constraints.overview]16.4.5.2 Namespace use [namespace.constraints]16.4.5.2.1 Namespace std [namespace.std]16.4.5.2.2 Namespace posix [namespace.posix]16.4.5.2.3 Namespaces for future standardization [namespace.future]16.4.5.3 Reserved names [reserved.names]16.4.5.3.1 General [reserved.names.general]16.4.5.3.2 Zombie names [zombie.names]16.4.5.3.3 Macro names [macro.names]16.4.5.3.4 External linkage [extern.names]16.4.5.3.5 Types [extern.types]16.4.5.3.6 User-defined literal suffixes [usrlit.suffix]16.4.5.4 Headers [alt.headers]16.4.5.5 Derived classes [derived.classes]16.4.5.6 Replacement functions [replacement.functions]16.4.5.7 Handler functions [handler.functions]16.4.5.8 Other functions [res.on.functions]16.4.5.9 Function arguments [res.on.arguments]16.4.5.10 Library object access [res.on.objects]16.4.5.11 Semantic requirements [res.on.requirements]16.4.6 Conforming implementations [conforming]16.4.6.1 Overview [conforming.overview]16.4.6.2 Headers [res.on.headers]16.4.6.3 Restrictions on macro definitions [res.on.macro.definitions]16.4.6.4 Non-member functions [global.functions]16.4.6.5 Member functions [member.functions]16.4.6.6 Friend functions [hidden.friends]16.4.6.7 Constexpr functions and constructors [constexpr.functions]16.4.6.8 Requirements for stable algorithms [algorithm.stable]16.4.6.9 Reentrancy [reentrancy]16.4.6.10 Data race avoidance [res.on.data.races]16.4.6.11 Properties of library classes [library.class.props]16.4.6.12 Protection within classes [protection.within.classes]16.4.6.13 Derived classes [derivation]16.4.6.14 Restrictions on exception handling [res.on.exception.handling]16.4.6.15 Contract assertions [res.contract.assertions]16.4.6.16 Value of error codes [value.error.codes]16.4.6.17 Moved-from state of library types [lib.types.movedfrom]16.1 General [library.general]This Clause describes the contents of the
C++ standard library,
how a well-formed C++ program makes use of the library, and
how a conforming implementation may provide the entities in the library. The following subclauses describe the method of
description ([description]) and organization ([organization]) of the
library. [requirements], Clause [support]
through Clause [exec], and Annex [depr] specify the contents of the
library, as well as library requirements and constraints on both well-formed
C++ programs and conforming implementations. Detailed specifications for each of the components in the library are in
Clause [support]–Clause [exec], as shown in
Table 23. Table 23 — Library categories [tab:library.categories]
The language support library (Clause [support]) provides components that are
required by certain parts of the C++ language,
such as memory allocation ([expr.new], [expr.delete]) and
exception processing (Clause [except]). The concepts library (Clause [concepts]) describes library components that C++
programs may use to perform compile-time validation of template arguments and
perform function dispatch based on properties of types. The diagnostics library (Clause [diagnostics]) provides a consistent framework for
reporting errors in a C++ program, including predefined exception classes. The memory management library (Clause [mem]) provides components for
memory management, including smart pointers and scoped allocators. The metaprogramming library (Clause [meta]) describes facilities
for use in templates and during constant evaluation,
including type traits, integer sequences, and rational arithmetic. The general utilities library (Clause [utilities]) includes components used
by other library elements, such as a predefined storage allocator for dynamic
storage management ([basic.stc.dynamic]), and components used
as infrastructure
in C++ programs,
such as tuples and function wrappers. The containers (Clause [containers]), iterators (Clause [iterators]), ranges (Clause [ranges]),
and algorithms (Clause [algorithms]) libraries provide a C++ program with access
to a subset of the most widely used algorithms and data structures. The strings library (Clause [strings]) provides support
for manipulating sequences of type char,
sequences of type char8_t,
sequences of type char16_t,
sequences of type char32_t,
sequences of type wchar_t,
and sequences of any other character-like type. The text processing library (Clause [text]) provides support for text processing,
including formatting, internationalization support and
regular expression matching and searching. The numerics library provides
numeric algorithms and complex number components that extend support for numeric processing. The
valarray
component provides support for
n-at-a-time
processing,
potentially implemented as parallel operations on platforms that support such processing. The random number component provides facilities for generating pseudo-random numbers. The input/output library (Clause [input.output]) provides the
iostream
components that are the primary mechanism for C++ program input and output. They can be used with other elements of the library, particularly
strings, locales, and iterators. The concurrency support library (Clause [thread]) provides components to create
and manage threads,
including atomic operations, mutual exclusion, and interthread communication. The execution control library (Clause [exec]) provides components
supporting execution of function objects. 16.2 The C standard library [library.c]The C++ standard library also makes available the facilities of the C standard library,
suitably adjusted to ensure static type safety. The descriptions of many library functions rely on the C standard library for
the semantics of those functions. In some cases,
the signatures specified in this document
may be different from the signatures in the C standard library,
and additional overloads may be declared in this document,
but the behavior and the preconditions
(including any preconditions implied by the use of
a C restrict qualifier)
are the same unless otherwise stated. A call to a C standard library function is
a non-constant library call ([defns.nonconst.libcall])
if it raises a floating-point exception other than FE_INEXACT. The semantics of a call to a C standard library function
evaluated as a core constant expression
are those specified in ISO/IEC 9899:2024, Annex F¹²⁰
to the extent applicable to the floating-point types ([basic.fundamental])
that are parameter types of the called function. 16.3 Method of description [description]16.3.1 General [description.general]Subclause [description] describes the conventions used to specify the C++ standard
library. [conventions] describes other editorial conventions. 16.3.2 Structure of each clause [structure]16.3.2.1 Elements [structure.elements]16.3.2.2 Summary [structure.summary]16.3.2.3 Requirements [structure.requirements]Requirements are stated in terms of well-defined expressions that define valid terms of
the types that meet the requirements. For every set of well-defined expression
requirements there is either a named concept or a table that specifies an initial set of the valid expressions and
their semantics. Any generic algorithm (Clause [algorithms]) that uses the
well-defined expression requirements is described in terms of the valid expressions for
its template type parameters. The library specification uses a typographical convention for naming
requirements. Names in italic type that begin with the prefix
Cpp17 refer to sets of well-defined expression requirements typically
presented in tabular form, possibly with additional prose semantic requirements. Names in constant width type refer to library concepts
which are presented as a concept definition (Clause [temp]), possibly with additional
prose semantic requirements. Required operations of any concept defined in this document need not be
total functions; that is, some arguments to a required operation may
result in the required semantics failing to be met. [Example 1: The required < operator of the totally_ordered
concept ([concept.totallyordered]) does not meet the
semantic requirements of that concept when operating on NaNs. — end example]
This does not affect whether a type models the concept. A declaration may explicitly impose requirements through its associated
constraints ([temp.constr.decl]). When the associated constraints refer to a
concept ([temp.concept]), the semantic constraints specified for that concept
are additionally imposed on the use of the declaration. 16.3.2.4 Detailed specifications [structure.specifications]Descriptions of function semantics contain the following elements (as
appropriate):¹²⁴
Whenever the Effects element specifies that the semantics of some function
F are Equivalent to some code sequence, then the various elements are
interpreted as follows. If F's semantics specifies any Constraints or Mandates elements,
then those requirements are logically imposed prior to the equivalent-to semantics. Next, the semantics of the code sequence are determined by the
Constraints,
Mandates,
Constant When,
Preconditions,
Hardened preconditions,
Effects,
Synchronization,
Postconditions,
Returns,
Throws,
Complexity,
Remarks, and
Error conditions
specified for the function invocations contained in the code sequence. The value returned from F is specified by F's Returns element,
or if F has no Returns element,
a non-void return from F is specified by the
return statements ([stmt.return]) in the code sequence. If F's semantics contains a Throws,
Postconditions, or Complexity element,
then that supersedes any occurrences of that element in the code sequence. For non-reserved replacement and handler functions,
Clause [support] specifies two behaviors for the functions in question:
their required and default behavior. The default behavior
describes a function definition provided by the implementation. The required behavior
describes the semantics of a function definition provided by
either the implementation or a C++ program. Where no distinction is explicitly made in the description, the
behavior described is the required behavior. Complexity requirements specified in the library clauses are upper bounds,
and implementations that provide better complexity guarantees meet
the requirements. 16.3.2.5 C library [structure.see.also]Paragraphs labeled “See also” contain cross-references to the relevant portions
of other standards (Clause [intro.refs]). 16.3.3 Other conventions [conventions]16.3.3.1 General [conventions.general]Subclause [conventions] describes several editorial conventions used to describe the contents
of the C++ standard library. 16.3.3.2 Exposition-only entities, etc. [expos.only.entity]Several entities
declared in Clause [support] through Clause [exec] and Annex [depr]
are provided for exposition only. The declaration of such an entity
is followed by a comment ending in exposition only. The following are provided for exposition only
to aid in the specification of the library:
namespace std {
template<class T>
requires convertible_to<T, decay_t<T>>
constexpr decay_t<T> decay-copy(T&& v) // exposition only
noexcept(is_nothrow_convertible_v<T, decay_t<T>>)
{ return std::forward<T>(v); }
constexpr auto synth-three-way = // exposition only
[]<class T, class U>(const T& t, const U& u)
requires requires {
{ t < u } -> boolean-testable;
{ u < t } -> boolean-testable;
}
{
if constexpr (three_way_comparable_with<T, U>) {
return t <=> u;
} else {
if (t < u) return weak_ordering::less;
if (u < t) return weak_ordering::greater;
return weak_ordering::equivalent;
}
};
template<class T, class U = T>
using synth-three-way-result = // exposition only
decltype(synth-three-way(declval<T&>(), declval<U&>()));
template<class T>
concept constexpr-wrapper-like = // exposition only
convertible_to<T, decltype(T::value)> &&
equality_comparable_with<T, decltype(T::value)> &&
bool_constant<T() == T::value>::value &&
bool_constant<static_cast<decltype(T::value)>(T()) == T::value>::value;
}
An object dst is said to be decay-copied from
a subexpression src
if the type of dst is
decay_t<decltype((src))>
16.3.3.3 Type descriptions [type.descriptions]Certain types shown in Clause [input.output] are used to describe implementation-defined types. They are based on other types, but with added constraints. 126)126) Examples
from [utility.requirements] include:
Cpp17EqualityComparable,
Cpp17LessThanComparable,
Cpp17CopyConstructible. Examples from [iterator.requirements] include:
Cpp17InputIterator,
Cpp17ForwardIterator. 16.3.3.3.2 Enumerated types [enumerated.types]The enumerated type enumerated can be written:
enum enumerated { V0, V1, V2, V3, … };
inline const enumerated C0(V0);
inline const enumerated C1(V1);
inline const enumerated C2(V2);
inline const enumerated C3(V3);
⋮
All such elements have distinct values. 16.3.3.3.3 Bitmask types [bitmask.types]Several types specified in Clause [support] through Clause [exec]
and Annex [depr] are
bitmask types. The bitmask type bitmask can be written:
// For exposition only.
// int_type is an integral type capable of representing all values of the bitmask type.
enum bitmask : int_type {
V0 = 1 << 0, V1 = 1 << 1, V2 = 1 << 2, V3 = 1 << 3, …
};
inline constexpr bitmask C0(V0);
inline constexpr bitmask C1(V1);
inline constexpr bitmask C2(V2);
inline constexpr bitmask C3(V3);
⋮
constexpr bitmask operator&(bitmask X, bitmask Y) {
return static_cast<bitmask>(
static_cast<int_type>(X) & static_cast<int_type>(Y));
}
constexpr bitmask operator|(bitmask X, bitmask Y) {
return static_cast<bitmask>(
static_cast<int_type>(X) | static_cast<int_type>(Y));
}
constexpr bitmask operator^(bitmask X, bitmask Y) {
return static_cast<bitmask>(
static_cast<int_type>(X) ^ static_cast<int_type>(Y));
}
constexpr bitmask operator~(bitmask X) {
return static_cast<bitmask>(~static_cast<int_type>(X));
}
bitmask& operator&=(bitmask& X, bitmask Y) {
X = X & Y; return X;
}
bitmask& operator|=(bitmask& X, bitmask Y) {
X = X | Y; return X;
}
bitmask& operator^=(bitmask& X, bitmask Y) {
X = X ^ Y; return X;
}
All such elements have distinct, nonzero values such that, for any pair Ci
and Cj where i ≠ j, Ci & Ci is nonzero and
Ci & Cj is zero. Additionally, the value 0 is used to represent an empty bitmask, in which no
bitmask elements are set. 16.3.3.3.4 Character sequences [character.seq]16.3.3.3.4.1 General [character.seq.general]The C standard library makes widespread use
of characters and character sequences that follow a few uniform conventions:
16.3.3.3.4.2 Byte strings [byte.strings]A null-terminated byte string,
or ntbs,
is a character sequence whose highest-addressed element
with defined content has the value zero
(the terminating null character);
no other element in the sequence has the value zero.¹²⁸ The length of an ntbs
is the number of elements that
precede the terminating null character. An empty ntbs
has a length of zero. The value of an ntbs
is the sequence of values of the
elements up to and including the terminating null character. 16.3.3.3.4.3 Multibyte strings [multibyte.strings]A multibyte character is
a sequence of one or more bytes representing the
code unit sequence for an encoded character of the
execution character set. A null-terminated multibyte string,
or ntmbs,
is an ntbs that constitutes a
sequence of valid multibyte characters, beginning and ending in the initial
shift state.¹³⁰ 16.3.3.3.5 Customization Point Object types [customization.point.object]A customization point object is a function object ([function.objects])
with a literal class type that interacts with program-defined types while
enforcing semantic requirements on that interaction. The type of a customization point object, ignoring cv-qualifiers, shall model
semiregular ([concepts.object])
and shall be
a structural type ([temp.param]) and
a trivially copyable type ([class.prop]). Every constructor of this type
shall have a non-throwing exception specification ([except.spec]). All instances of a specific customization point object type shall
be equal ([concepts.equality]). The effects of invoking different instances
of a specific customization point object type on the same arguments
are equivalent. The type T of a customization point object,
ignoring cv-qualifiers, shall model
invocable<T&, Args...>,
invocable<const T&, Args...>,
invocable<T, Args...>, and
invocable<const T, Args...> ([concept.invocable])
when the types in Args... meet the requirements specified in that
customization point object's definition. When the types of Args... do
not meet the customization point object's requirements, T shall not have
a function call operator that participates in overload resolution. 16.3.3.4 Algorithm function objects [alg.func.obj]An algorithm function object is
a customization point object ([customization.point.object])
that is specified as one or more overloaded function templates. The name of these function templates designates
the corresponding algorithm function object. Then for any sequence of arguments args …,
o(args …) is expression-equivalent to
s(args …),
where the result of name lookup for s is the overload set S. [Note 1: Algorithm function objects are not found by
argument-dependent name lookup ([basic.lookup.argdep]). When found by unqualified name lookup ([basic.lookup.unqual])
for the postfix-expression in a function call ([expr.call]),
they inhibit argument-dependent name lookup. — end note]16.3.3.5 Functions within classes [functions.within.classes]For the sake of exposition, Clause [support] through Clause [exec]
and Annex [depr] do not describe copy/move constructors, assignment
operators, or (non-virtual) destructors with the same apparent
semantics as those that can be generated
by default ([class.copy.ctor], [class.copy.assign], [class.dtor]). It is unspecified whether
the implementation provides explicit definitions for such member function
signatures, or for virtual destructors that can be generated by default. 16.3.3.6 Private members [objects.within.classes]Clause [support] through Clause [exec] and
Annex [depr] do not specify the representation of classes, and intentionally
omit specification of class members. An implementation may
define static or non-static class members, or both, as needed to implement the
semantics of the member functions specified in Clause [support]
through Clause [exec] and Annex [depr]. For the sake of exposition,
some subclauses provide representative declarations, and semantic requirements, for
private members of classes that meet the external specifications of the classes. The declarations for such members are
followed by a comment that ends with exposition only, as in:
streambuf* sb; // exposition only
16.3.3.7 Freestanding items [freestanding.item]A freestanding item is
a declaration, entity, or macro
that is required to be present in
a freestanding implementation and a hosted implementation. Unless otherwise specified,
the requirements on freestanding items for a freestanding implementation
are the same as the corresponding requirements for a hosted implementation,
except that not all of the members of those items are required to be present. Function declarations and function template declarations
followed by a comment that include freestanding-deleted are
freestanding deleted functions. On freestanding implementations,
it is implementation-defined
whether each entity introduced by a freestanding deleted function
is a deleted function ([dcl.fct.def.delete]) or
whether the requirements are the same as
the corresponding requirements for a hosted implementation. [Example 1: double abs(double j); // freestanding-deleted
— end example] A declaration in a synopsis is a freestanding item if
[Example 2: // all freestanding
namespace std {
— end example] An entity or deduction guide
is a freestanding item if its introducing declaration is not followed by
a comment that includes hosted, and is:
A macro is a freestanding item if it is defined in a header synopsis and
[Example 3: #define NULL see below // freestanding
— end example] [Note 3: Freestanding annotations follow some additional exposition conventions
that do not impose any additional normative requirements. Header synopses that begin with a comment containing "all freestanding"
contain no hosted items and no freestanding deleted functions. Header synopses that begin with a comment containing "mostly freestanding"
contain at least one hosted item or freestanding deleted function. Classes and class templates followed by a comment
containing "partially freestanding"
contain at least one hosted item or freestanding deleted function. — end note][Example 4: template<class T, size_t N> struct array; // partially freestanding
template<class T, size_t N>
struct array {
constexpr reference operator[](size_type n);
constexpr const_reference operator[](size_type n) const;
constexpr reference at(size_type n); // freestanding-deleted
constexpr const_reference at(size_type n) const; // freestanding-deleted
};
— end example] 16.4 Library-wide requirements [requirements]16.4.1 General [requirements.general]Subclause [requirements] specifies requirements that apply to the entire C++ standard library. Clause [support] through Clause [exec] and Annex [depr]
specify the requirements of individual entities within the library. Requirements specified in terms of interactions between threads do not apply to
programs having only a single thread of execution. [organization] describes the library's contents and
organization, [using] describes how well-formed C++ programs gain access to library
entities,
[utility.requirements] describes constraints on types and functions used with
the C++ standard library,
[constraints] describes constraints on well-formed C++ programs, and
[conforming] describes constraints on conforming implementations. 16.4.2 Library contents and organization [organization]16.4.2.1 General [organization.general][contents] describes the entities and macros defined in the C++ standard library. [compliance] lists requirements for a freestanding implementation of the C++
standard library. 16.4.2.2 Library contents [contents]Whenever an unqualified name other than
swap, make_error_code, make_error_condition,
from_stream, or
submdspan_mapping
is used in the specification of a declaration D
in Clause [support] through Clause [exec] or Annex [depr],
its meaning is established
as-if by performing unqualified name lookup ([basic.lookup.unqual])
in the context of D.
Similarly, the meaning of a qualified-id is established
as-if by performing qualified name lookup ([basic.lookup.qual])
in the context of D. [Example 1: The reference to is_array_v in the specification of std::to_array ([array.creation]) refers to ::std::is_array_v. — end example][Note 2: — end note]
The meaning of the unqualified name swap is established
in an overload resolution context
for swappable values ([swappable.requirements]). The meanings of the unqualified names
make_error_code, make_error_condition,
from_stream, and
submdspan_mapping
are established
as-if by performing argument-dependent lookup ([basic.lookup.argdep]). 131)131) The C standard library headers ([support.c.headers]) also define
names within the global namespace, while the C++ headers for C library
facilities ([headers]) can also define names within the global namespace. Table 24 — C++ library headers [tab:headers.cpp]
Table 25 — C++ headers for C library facilities [tab:headers.cpp.c]
The headers listed in Table 24, or,
for a freestanding implementation,
the subset of such headers that are provided by the implementation,
are collectively known as
the importable C++ library headers. [Note 1: Importable C++ library headers can be
imported ([module.import]). — end note][Example 1: import <vector>; // imports the <vector> header unit
std::vector<int> vi; // OK
— end example] Except as noted in Clause [library] through Clause [exec]
and Annex [depr], the contents of each header cname is
the same as that of the corresponding header name.h as
specified in the C standard library. In the C++ standard library, however, the
declarations (except for names which are defined as macros in C) are within
namespace scope of the namespace std. It is unspecified whether these names (including any overloads added in
Clause [support] through Clause [exec] and Annex [depr])
are first declared within the global namespace scope
and are then injected into namespace std by explicit
using-declarations ([namespace.udecl]). Subclause [support.c.headers] describes the effects of using
the name.h (C header) form in a C++ program.¹³⁷ ISO/IEC 9899:2024, Annex K describes a large number of functions,
with associated types and macros,
which “promote safer, more secure programming”
than many of the traditional C library functions. The names of the functions have a suffix of _s;
most of them provide the same service
as the C library function with the unsuffixed name,
but generally take an additional argument
whose value is the size of the result array. If any C++ header is included,
it is implementation-defined
whether any of these names
is declared in the global namespace. (None of them is declared in namespace std.) These names are also subject to the restrictions of [macro.names]. Table 26 — Names from ISO/IEC 9899:2024, Annex K [tab:c.annex.k.names]
133)133) A header is not necessarily a source file, nor are the
sequences delimited by < and > in header names necessarily valid source
file names ([cpp.include]). 16.4.2.4 Modules [std.modules]The named module std.compat exports the same declarations as
the named module std, and
additionally exports
It is unspecified to which module a declaration in the standard library
is attached. [Note 1: Conforming implementations ensure that mixing
#include and import does not result in
conflicting attachments ([basic.link]). — end note]Recommended practice: Implementations should ensure such attachments do not preclude
further evolution or decomposition of the standard library modules. A declaration in the standard library denotes the same entity regardless of
whether it was made reachable through
including a header,
importing a header unit, or
importing a C++ library module. Recommended practice: Implementations should avoid exporting any other declarations
from the C++ library modules. [Note 2: Like all named modules, the C++ library modules
do not make macros visible ([module.import]), such as
assert ([cassert.syn]),
errno ([cerrno.syn]),
offsetof ([cstddef.syn]), and
va_arg ([cstdarg.syn]). — end note]16.4.2.5 Freestanding implementations [compliance]Two kinds of implementations are defined:
hosted and freestanding ([intro.compliance]);
the kind of the implementation is
implementation-defined. For a hosted implementation, this document
describes the set of available headers. A freestanding implementation has an
implementation-defined set of headers. Table 27 — C++ headers for freestanding implementations [tab:headers.cpp.fs]
For each of the headers listed in Table 27,
a freestanding implementation provides at least
the freestanding items ([freestanding.item]) declared in the header. The hosted library facilities are
the set of facilities described in this document
that are required for hosted implementations,
but not required for freestanding implementations. A freestanding implementation provides
a (possibly empty) implementation-defined subset of
the hosted library facilities. Unless otherwise specified, the requirements on
each declaration, entity, and macro
provided in this way are the same as
the corresponding requirements for a hosted implementation,
except that not all of the members of the namespaces are required to be present. A freestanding implementation provides
deleted definitions ([dcl.fct.def.delete]) for
a (possibly empty) implementation-defined subset of
the namespace-scope functions and function templates
from the hosted library facilities. 16.4.3.1 Overview [using.overview]Subclause [using] describes how a C++ program gains access to the facilities of the
C++ standard library. [using.headers] describes effects during translation
phase 4, while [using.linkage] describes effects during phase
8. 16.4.3.2 Headers [using.headers]The entities in the C++ standard library are defined in headers,
whose contents are made available to a translation unit when it contains the appropriate
#include
preprocessing directive ([cpp.include])
or the appropriate
import declaration ([module.import]). A translation unit may include library headers in any order ([lex.separate]). Each may be included more than once, with no effect different from
being included exactly once, except that the effect of including either
<cassert> or <assert.h>
depends each time on the lexically current definition of
NDEBUG.¹³⁸ A translation unit shall include a header only outside of any
declaration or definition and,
in the case of a module unit,
only in its global-module-fragment, and
shall include the header or import the corresponding header unit lexically
before the first reference in that translation unit to any of the entities
declared in that header. No diagnostic is required. 16.4.3.3 Linkage [using.linkage]Entities in the C++ standard library have external linkage. Unless otherwise specified, objects and functions have the default
extern "C++"
linkage ([dcl.link]). Objects and functions
defined in the library and required by a C++ program are included in
the program prior to program startup. 16.4.4 Requirements on types and expressions [utility.requirements][utility.arg.requirements]
describes requirements on types and expressions used to instantiate templates
defined in the C++ standard library. [swappable.requirements] describes the requirements on swappable types and
swappable expressions. [nullablepointer.requirements] describes the requirements on pointer-like
types that support null values. [hash.requirements] describes the requirements on hash function objects. [allocator.requirements] describes the requirements on storage
allocators. 16.4.4.2 Template argument requirements [utility.arg.requirements]The template definitions in the C++ standard library
refer to various named requirements whose details are set out in
Tables 28–35. In these tables,
Table 28 — Cpp17EqualityComparable requirements [tab:cpp17.equalitycomparable]
Table 29 — Cpp17LessThanComparable requirements [tab:cpp17.lessthancomparable]
Table 31 — Cpp17MoveConstructible requirements [tab:cpp17.moveconstructible]
Table 32 — Cpp17CopyConstructible requirements (in addition to Cpp17MoveConstructible) [tab:cpp17.copyconstructible]
Table 33 — Cpp17MoveAssignable requirements [tab:cpp17.moveassignable]
Table 34 — Cpp17CopyAssignable requirements (in addition to Cpp17MoveAssignable) [tab:cpp17.copyassignable]
Table 35 — Cpp17Destructible requirements [tab:cpp17.destructible]
16.4.4.3 Swappable requirements [swappable.requirements]An object t is swappable with an object u if and only if
The context in which swap(t, u) and swap(u, t) are evaluated shall
ensure that a binary non-member function named “swap” is selected via overload
resolution on a candidate set that includes:
[Note 1: If T and U are both fundamental types or arrays of
fundamental types and the declarations from the header <utility> are in
scope, the overall lookup set described above is equivalent to that of the
qualified name lookup applied to the expression std::swap(t, u) or
std::swap(u, t) as appropriate. — end note]A type X meeting any of the iterator requirements ([iterator.requirements])
meets the Cpp17ValueSwappable requirements if,
for any dereferenceable object
x of type X,
*x is swappable. [Example 1: User code can ensure that the evaluation of swap calls
is performed in an appropriate context under the various conditions as follows:
#include <cassert>
#include <utility>
// Preconditions: std::forward<T>(t) is swappable with std::forward<U>(u).
template<class T, class U>
void value_swap(T&& t, U&& u) {
using std::swap;
swap(std::forward<T>(t), std::forward<U>(u)); // OK, uses “swappable with'' conditions
// for rvalues and lvalues
}
// Preconditions: T meets the Cpp17Swappable requirements.
template<class T>
void lv_swap(T& t1, T& t2) {
using std::swap;
swap(t1, t2); // OK, uses swappable conditions for lvalues of type T
}
namespace N {
struct A { int m; };
struct Proxy { A* a; };
Proxy proxy(A& a) { return Proxy{ &a }; }
void swap(A& x, Proxy p) {
std::swap(x.m, p.a->m); // OK, uses context equivalent to swappable
// conditions for fundamental types
}
void swap(Proxy p, A& x) { swap(x, p); } // satisfy symmetry constraint
}
int main() {
int i = 1, j = 2;
lv_swap(i, j);
assert(i == 2 && j == 1);
N::A a1 = { 5 }, a2 = { -5 };
value_swap(a1, proxy(a2));
assert(a1.m == -5 && a2.m == 5);
}
— end example]16.4.4.4 Cpp17NullablePointer requirements [nullablepointer.requirements]A Cpp17NullablePointer type is a pointer-like type that supports null values. A type P meets the Cpp17NullablePointer requirements if
A value-initialized object of type P produces the null value of the type. The null value shall be equivalent only to itself. A default-initialized object
of type P may have an indeterminate or erroneous value. [Note 1: Operations involving indeterminate values can cause undefined behavior, and
operations involving erroneous values can cause erroneous behavior ([basic.indet]). — end note]Table 36 — Cpp17NullablePointer requirements [tab:cpp17.nullablepointer]
16.4.4.5 Cpp17Hash requirements [hash.requirements]A type H meets the Cpp17Hash requirements if
Table 37 — Cpp17Hash requirements [tab:cpp17.hash]
16.4.4.6 Cpp17Allocator requirements [allocator.requirements]The library describes a standard set of requirements for allocators,
which are class-type objects that encapsulate the information about an allocation model. This information includes the knowledge of pointer types, the type of their
difference, the type of the size of objects in this allocation model, as well
as the memory allocation and deallocation primitives for it. All of the
string types (Clause [strings]),
containers (Clause [containers]) (except array and inplace_vector),
string buffers and string streams (Clause [input.output]), and
match_results are parameterized in terms of
allocators. In [allocator.requirements],
The class template allocator_traits ([allocator.traits]) supplies
a uniform interface to all allocator types. This subclause
describes the requirements on allocator types
and thus on types used to instantiate allocator_traits. A requirement is optional if a default for a
given type or expression is specified. Within the standard library allocator_traits
template, an optional requirement that is not supplied by an allocator is
replaced by the specified default type or expression. typename X::pointer
typename X::const_pointer
typename X::void_pointer
typename Y::void_pointer
typename X::const_void_pointer
typename Y::const_void_pointer
typename X::value_type
typename X::size_type
typename X::difference_type
typename X::rebind<U>::other
Remarks: If Allocator is a class template specialization of the form
SomeAllocator<T, Args>, where Args is zero or more type
arguments, and Allocator does not supply a rebind member
template, the standard allocator_traits template uses
SomeAllocator<U, Args> in place of Allocator::rebind<U>::other
by default. For allocator types that are not template specializations of the
above form, no default is provided. *p
*q
p->m
q->m
static_cast<XX::pointer>(w)
static_cast<XX::const_pointer>(x)
pointer_traits<XX::pointer>::pointer_to(r)
a.allocate(n)
Effects: Memory is allocated for an array of n T
and such an object is created
but array elements are not constructed. a.allocate(n, y)
a.allocate_at_least(n)
a.deallocate(p, n)
Preconditions: a.max_size()
a1 == a2
a1 != a2
a == b
a != b
X u(a);
X u = a;
X u(b);
X u(std::move(a));
X u = std::move(a);
X u(std::move(b));
a.construct(c, args...)
a.destroy(c)
a.select_on_container_copy_construction()
typename X::propagate_on_container_copy_assignment
Returns: true_type only if an allocator of type X should be copied
when the client container is copy-assigned;
if so, X shall meet
the Cpp17CopyAssignable requirements (Table 34) and
the copy operation shall not throw exceptions. typename X::propagate_on_container_move_assignment
Returns: true_type only if an allocator of type X should be moved
when the client container is move-assigned;
if so, X shall meet
the Cpp17MoveAssignable requirements (Table 33) and
the move operation shall not throw exceptions. typename X::propagate_on_container_swap
Returns: true_type only if an allocator of type X should be swapped
when the client container is swapped;
if so,
X shall meet the Cpp17Swappable requirements ([swappable.requirements]) and
the swap operation shall not throw exceptions. typename X::is_always_equal
The XX::pointer, XX::const_pointer, XX::void_pointer, and
XX::const_void_pointer types shall meet the
Cpp17NullablePointer requirements (Table 36). No constructor,
comparison operator function, copy operation, move operation, or swap operation on
these pointer types shall exit via an exception. XX::pointer and XX::const_pointer shall also
meet the requirements for
a Cpp17RandomAccessIterator ([random.access.iterators]) and
the additional requirement that, when p and (p + n) are
dereferenceable pointer values for some integral value n,
addressof(*(p + n)) == addressof(*p) + n
is true. Let x1 and x2 denote objects of (possibly different) types
XX::void_pointer, XX::const_void_pointer, XX::pointer,
or XX::const_pointer. Then, x1 and x2 are
equivalently-valued pointer values, if and only if both x1 and x2
can be explicitly converted to the two corresponding objects px1 and px2
of type XX::const_pointer, using a sequence of static_casts
using only these four types, and the expression px1 == px2
evaluates to true. [Example 2: The following is an allocator class template supporting the minimal
interface that meets the requirements of [allocator.requirements.general]:
template<class T>
struct SimpleAllocator {
using value_type = T;
SimpleAllocator(ctor args);
template<class U> SimpleAllocator(const SimpleAllocator<U>& other);
T* allocate(std::size_t n);
void deallocate(T* p, std::size_t n);
template<class U> bool operator==(const SimpleAllocator<U>& rhs) const;
};
— end example]The following exposition-only concept defines
the minimal requirements on an Allocator type. namespace std {
template<class Alloc>
concept simple-allocator =
requires(Alloc alloc, size_t n) {
{ *alloc.allocate(n) } -> same_as<typename Alloc::value_type&>;
{ alloc.deallocate(alloc.allocate(n), n) };
} &&
copy_constructible<Alloc> &&
equality_comparable<Alloc>;
}
A type Alloc models simple-allocator
if it meets the requirements of [allocator.requirements.general]. 16.4.4.6.2 Allocator completeness requirements [allocator.requirements.completeness]If X is an allocator class for type T,
X additionally meets the allocator completeness requirements if,
whether or not T is a complete type:
16.4.5 Constraints on programs [constraints]16.4.5.1 Overview [constraints.overview]Subclause [constraints] describes restrictions on C++ programs that use the facilities of
the C++ standard library. The following subclauses specify constraints on the
program's use of namespaces, its use of various reserved
names, its use of headers, its use of
standard library classes as base classes ([derived.classes]), its
definitions of replacement functions, and its
installation of handler functions during execution. 16.4.5.2 Namespace use [namespace.constraints]16.4.5.2.1 Namespace std [namespace.std]Unless otherwise specified,
the behavior of a C++ program is undefined if it adds declarations or definitions to namespace
std
or to a namespace within namespace
std. Unless explicitly prohibited,
a program may add a template specialization for
any standard library class template
to namespace
std provided that
The behavior of a C++ program is undefined
if it declares an explicit or partial specialization
of any standard library variable template,
except where explicitly permitted by the specification of that variable template. The behavior of a C++ program is undefined if it declares
Let F denote
a standard library function ([global.functions]),
a standard library static member function,
or a specialization
of a standard library function template. Unless F is designated
an addressable function,
the behavior of a C++ program is unspecified (possibly ill-formed)
if it explicitly or implicitly attempts
to form a pointer
to F. [Note 2: Possible means of forming such pointers include
application of the unary & operator ([expr.unary.op]),
addressof ([specialized.addressof]),
or
a function-to-pointer standard conversion ([conv.func]). — end note]
Moreover,
the behavior of a C++ program is unspecified (possibly ill-formed)
if it attempts to form a reference
to F
or
if it attempts to form a pointer-to-member designating
either a standard library non-static member function ([member.functions])
or a specialization of a standard library member function template. Let F denote
a standard library function or function template. Unless F is designated an addressable function,
it is unspecified if or how
a reflection value designating the associated entity can be formed. For any value p of type meta::info that
represents a reflection of a parameter of F,
it is unspecified if has_identifier(p)
returns true or false, and
if meta::has_identifier(p) is true, then
the ntmbs produced by
meta::identifier_of(p) and
meta::u8identifier_of(p) is unspecified. 16.4.5.2.2 Namespace posix [namespace.posix]16.4.5.2.3 Namespaces for future standardization [namespace.future]Top-level namespaces whose namespace-name consists of std
followed by one or more digits ([lex.name])
are reserved for future standardization. The behavior of a C++ program is undefined if
it adds declarations or definitions to such a namespace. 16.4.5.3 Reserved names [reserved.names]16.4.5.3.1 General [reserved.names.general]If a program declares or defines a name in a context where it is
reserved, other than as explicitly allowed by Clause [library], its behavior is
undefined. 16.4.5.3.2 Zombie names [zombie.names]In namespace std, the names shown in Table 38 are
reserved for previous standardization: Table 38 — Zombie names in namespace std [tab:zombie.names.std]
The names shown in Table 39 are reserved as members for
previous standardization, and may not be used as a name for object-like macros
in portable code: Table 39 — Zombie object-like macros [tab:zombie.names.objmacro]
The names shown in Table 40 are reserved as member functions
for previous standardization, and may not be used as a name for function-like
macros in portable code: Table 40 — Zombie function-like macros [tab:zombie.names.fnmacro]
The header names shown in Table 41 are reserved for previous
standardization: Table 41 — Zombie headers [tab:zombie.names.header]
16.4.5.3.3 Macro names [macro.names]A translation unit that includes a standard library header shall not
#define or #undef names declared in any standard
library header. 16.4.5.3.4 External linkage [extern.names]Each name from the C standard library declared with external linkage
is reserved to the implementation for use as a name with
extern "C"
linkage,
both in namespace std and in the global namespace. 16.4.5.3.5 Types [extern.types]For each type T from the C standard library,
the types
::T
and
std::T
are reserved to the implementation and, when declared,
::T
shall be identical to
std::T. 16.4.5.3.6 User-defined literal suffixes [usrlit.suffix]Literal suffix identifiers ([over.literal]) that do not start with an underscore are reserved for future standardization. Literal suffix identifiers that contain a double underscore
__
are reserved for use by C++ implementations. 16.4.5.4 Headers [alt.headers]16.4.5.5 Derived classes [derived.classes]Virtual member function signatures defined
for a base class in the C++ standard
library may be overridden in a derived class defined in the program ([class.virtual]). 16.4.5.6 Replacement functions [replacement.functions]If a function defined in
Clause [support] through Clause [exec] and Annex [depr]
is specified as replaceable ([dcl.fct.def.replace]),
the description of function semantics apply
to both the default version defined by the C++ standard library and
the replacement function defined by the program. 16.4.5.7 Handler functions [handler.functions]The C++ standard library provides a default version of the following handler
function (Clause [support]):
A C++ program may install different handler functions during execution, by
supplying a pointer to a function defined in the program or the library
as an argument to (respectively):
A call to any of the set_* functions synchronizes with subsequent calls to the same
set_* function and to the corresponding get_* function. 16.4.5.8 Other functions [res.on.functions]In certain cases (replacement functions, handler functions, operations on types used to
instantiate standard library template components), the C++ standard library depends on
components supplied by a C++ program. If these components do not meet their requirements, this document places no requirements
on the implementation. In particular, the behavior is undefined in the following cases:
16.4.5.9 Function arguments [res.on.arguments]Each of the following applies to all arguments
to functions defined in the C++ standard library,
unless explicitly stated otherwise.
16.4.5.10 Library object access [res.on.objects]The behavior of a program is undefined if calls to standard library functions from different
threads may introduce a data race. The conditions under which this may occur are specified
in [res.on.data.races]. 16.4.5.11 Semantic requirements [res.on.requirements]A sequence Args of template arguments is said to
model a concept C
if Args
satisfies C ([temp.constr.decl]) and
meets all semantic requirements (if any)
given in the specification of C. If the validity or meaning of a program
depends on whether a sequence of template arguments models a concept, and
the concept is satisfied but not modeled,
the program is ill-formed, no diagnostic required. If the semantic requirements of a declaration's
constraints ([structure.requirements]) are not modeled at the point of use,
the program is ill-formed, no diagnostic required. 16.4.6 Conforming implementations [conforming]16.4.6.1 Overview [conforming.overview]Subclause [conforming] describes the constraints upon, and latitude of, implementations of the C++ standard library. An implementation's use of
16.4.6.2 Headers [res.on.headers]Certain types and macros are defined in more than one header. Every such entity shall be defined such that any header that defines it may be
included after any other header that also defines it ([basic.def.odr]). The C standard library headers
shall include only their corresponding C++ standard library header,
as described in [headers]. 16.4.6.3 Restrictions on macro definitions [res.on.macro.definitions]The names and global function signatures described in [contents] are
reserved to the implementation. All object-like macros defined by the C standard library and described in this
Clause as expanding to integral constant expressions are also suitable for use
in #if preprocessing directives, unless
explicitly stated otherwise. 16.4.6.4 Non-member functions [global.functions]A call to a non-member function signature
described in Clause [support] through Clause [exec] and
Annex [depr] shall behave as if the implementation declared no additional
non-member function signatures.¹⁴⁴ An implementation shall not declare a non-member function signature
with additional default arguments. Unless otherwise specified,
calls made by functions in the standard library to non-operator, non-member functions
do not use functions from another namespace which are found through
argument-dependent name lookup ([basic.lookup.argdep]). [Note 1: The phrase “unless otherwise specified” applies to cases such as
the swappable with requirements ([swappable.requirements]). The exception for overloaded operators allows argument-dependent lookup
in cases like that of
ostream_iterator::operator= ([ostream.iterator.ops])
where lookup for the expression *out_stream << value
includes the associated namespaces of value's type. — end note]16.4.6.5 Member functions [member.functions]For a non-virtual member function described in the C++ standard library,
an implementation may declare a different set of member function signatures,
provided that any call to the member function that would select
an overload from the set of declarations described in this document
behaves as if that overload were selected. 16.4.6.6 Friend functions [hidden.friends]Whenever this document specifies
a friend declaration of a function or function template
within a class or class template definition,
that declaration shall be
the only declaration of that function or function template
provided by an implementation. [Note 2: Such a friend function or function template declaration
is known as a hidden friend,
as it is visible neither
to ordinary unqualified lookup ([basic.lookup.unqual]) nor
to qualified lookup ([basic.lookup.qual]). — end note]16.4.6.7 Constexpr functions and constructors [constexpr.functions]This document explicitly requires that certain standard library functions are
constexpr ([dcl.constexpr]). An implementation shall not declare
any standard library function signature as constexpr except for those where
it is explicitly required. Within any header that provides any non-defining declarations of constexpr
functions an implementation shall provide corresponding definitions. 16.4.6.8 Requirements for stable algorithms [algorithm.stable]When the requirements for an algorithm state that it is “stable” without further elaboration,
it means:
16.4.6.9 Reentrancy [reentrancy]Except where explicitly specified in this document, it is implementation-defined which functions in the C++ standard
library may be recursively reentered. During the execution of
a standard library non-static member function F on an object,
if that object is accessed through a glvalue that is not obtained,
directly or indirectly,
from the object parameter of F,
in a manner that can conflict ([intro.races])
with any access that F is permitted to perform ([res.on.data.races]),
the behavior is undefined unless otherwise specified. 16.4.6.10 Data race avoidance [res.on.data.races]This subclause specifies requirements that implementations shall meet to prevent
data races. Every standard library function shall meet each requirement unless otherwise specified. Implementations may prevent data races in cases other than those specified below. A C++ standard library function shall not directly or indirectly access
objects ([intro.multithread]) accessible by threads other than the current thread
unless the objects are accessed directly or indirectly via the function's arguments,
including this. A C++ standard library function shall not directly or indirectly modify
objects ([intro.multithread]) accessible by threads other than the current thread
unless the objects are accessed directly or indirectly via the function's non-const
arguments, including this. A C++ standard library function shall not access objects indirectly accessible via its
arguments or via elements of its container arguments except by invoking functions
required by its specification on those container elements. Operations on iterators obtained by calling a standard library container or string
member function may access the underlying container, but shall not modify it. Implementations may share their own internal objects between threads if the objects are
not visible to users and are protected against data races. 16.4.6.11 Properties of library classes [library.class.props]Unless explicitly stated otherwise, it is unspecified whether any class
described in Clause [support] through Clause [exec] and
Annex [depr] is a trivially copyable class, a standard-layout class, or an
implicit-lifetime class ([class.prop]). 16.4.6.12 Protection within classes [protection.within.classes]It is unspecified whether any function signature or class described in
Clause [support] through Clause [exec] and Annex [depr] is a
friend of another class in the C++ standard library. 16.4.6.13 Derived classes [derivation]An implementation may derive any class in the C++ standard library from a class with a
name reserved to the implementation. In any case:
All types specified in the C++ standard library shall be non-final types
unless otherwise specified. 16.4.6.14 Restrictions on exception handling [res.on.exception.handling]Any of the functions defined in the C++ standard library
can report a failure by throwing an exception of a type
described in its Throws: paragraph,
or of a type derived from a type named in the Throws: paragraph
that would be caught by a handler ([except.handle]) for the base type. Destructor operations defined in the C++ standard library
shall not throw exceptions. Every destructor in the C++ standard library shall behave as if it had a
non-throwing exception specification ([except.spec]). Functions defined in the
C++ standard library
that do not have a Throws: paragraph
but do have a potentially-throwing exception specification
may throw implementation-defined exceptions.¹⁴⁷
Implementations should
report errors by throwing exceptions of or derived
from the standard
exception classes ([bad.alloc], [support.exception], [std.exceptions]). An implementation may strengthen the
exception specification
for a non-virtual function
by adding a non-throwing exception specification. 147)147) In particular, they
can report a failure to allocate storage by throwing an exception of type
bad_alloc,
or a class derived from
bad_alloc ([bad.alloc]). 16.4.6.15 Contract assertions [res.contract.assertions]Unless specified otherwise,
an implementation may check
the specified preconditions and postconditions of a function
in the C++ standard library using contract
assertions ([basic.contract], [structure.specifications]). 16.4.6.16 Value of error codes [value.error.codes]Certain functions in the C++ standard library report errors via an
error_code ([syserr.errcode.overview]) object. That object's
category() member shall return system_category() for
errors originating from the operating system, or a reference to an
implementation-defined error_category object for errors originating elsewhere. The implementation shall define the possible values of value() for each of these
error categories. [Example 1: For operating systems that are based on POSIX,
implementations should define the std::system_category() values as
identical to the POSIX errno values, with additional values as defined by the
operating system's documentation. Implementations for operating systems that are not
based on POSIX should define values identical to the operating system's
values. For errors that do not originate from the operating system, the implementation
may provide enums for the associated values. — end example]16.4.6.17 Moved-from state of library types [lib.types.movedfrom]Objects of types defined in the C++ standard library may be moved
from ([class.copy.ctor]). Move operations may be explicitly specified or
implicitly generated. Unless otherwise specified, such moved-from objects shall
be placed in a valid but unspecified state ([defns.valid]). An object of a type defined in the C++ standard library may be
move-assigned ([class.copy.assign]) to itself. Unless otherwise specified, such an assignment places the object in
a valid but unspecified state. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||