A C++ header shall provide the declarations and definitions that appear in its
synopsis.
A C++ header shown in its synopsis as including other C++ headers
shall provide the declarations and definitions that appear in the synopses of
those other headers.
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.
A call to a non-member function signature
described in [support] through [exec] and
[depr] shall behave as if the implementation declared no additional
non-member function signatures.147
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]).
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.
For instance, an implementation can add parameters with default values,
or replace a member function with default arguments
with two or more member functions with equivalent behavior,
or add additional signatures for a member function name.
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.
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]).
For the merge algorithms, for equivalent elements in
the original two ranges, the elements from the first range (preserving their
original order) precede the elements from the second range (preserving their
original order).
Except where explicitly specified in this document, it is implementation-defined which functions in the C++ standard
library may be recursively reentered.
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.
This means, for example, that implementations can't use an object with static storage duration for
internal purposes without synchronization because doing so can cause a data race even in
programs that do not explicitly share objects between threads.
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.
Unless otherwise specified, C++ standard library functions shall perform all operations
solely within the current thread if those operations have effects that are
visible to users.
Unless explicitly stated otherwise, it is unspecified whether any class
described in [support] through [exec] and
[depr] is a trivially copyable class, a standard-layout class, or an
implicit-lifetime class ([class.prop]).
It is unspecified whether any function signature or class described in
[support] through [exec] and [depr] is a
friend of another class in the C++ standard library.
Certain classes defined in the C++ standard library are required to be derived from
other classes
in the C++ standard library.
An implementation may derive such a class directly from the required base or indirectly
through a hierarchy of base classes with names reserved to the implementation.
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.
Functions from the C standard library shall not throw exceptions148
except when such a function calls a program-supplied function that throws an
exception.149
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.150
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]).
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]).
Certain functions in the C++ standard library report errors via a
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.
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.