Files
2025-10-25 03:02:53 +03:00

2.8 KiB
Raw Permalink Blame History

[global.functions]

16 Library introduction [library]

16.4 Library-wide requirements [requirements]

16.4.6 Conforming implementations [conforming]

16.4.6.4 Non-member functions [global.functions]

1

#

It is unspecified whether any non-member functions in the C++ standard library are defined asinline.

2

#

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.155

3

#

An implementation shall not declare a non-member function signature with additional default arguments.

4

#

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 ofostream_iterator::operator=:

Effects: *out_stream << value;if (delim != 0)*out_stream << delim;return *this;

— end note]

155)155)

A valid C++ program always calls the expected library non-member function.

An implementation can also define additional non-member functions that would otherwise not be called by a valid C++ program.