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

63 lines
2.8 KiB
Markdown
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

[global.functions]
# 16 Library introduction [[library]](./#library)
## 16.4 Library-wide requirements [[requirements]](requirements#global.functions)
### 16.4.6 Conforming implementations [[conforming]](conforming#global.functions)
#### 16.4.6.4 Non-member functions [global.functions]
[1](#1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/lib-intro.tex#L3645)
It is unspecified whether any
non-member
functions in the C++ standard library are defined as[inline](dcl.inline "9.2.8The inline specifier[dcl.inline]")[.](#1.sentence-1)
[2](#2)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/lib-intro.tex#L3651)
A call to a non-member function signature
described in [[support]](support "17Language support library") through [[exec]](exec "33Execution control library") and[[depr]](depr "Annex D(normative)Compatibility features") shall behave as if the implementation declared no additional
non-member function signatures[.](#2.sentence-1)[155](#footnote-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.")
[3](#3)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/lib-intro.tex#L3663)
An implementation shall not declare a non-member function signature
with additional default arguments[.](#3.sentence-1)
[4](#4)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/lib-intro.tex#L3667)
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]](basic.lookup.argdep "6.5.4Argument-dependent name lookup"))[.](#4.sentence-1)
[*Note [1](#note-1)*:
The phrase “unless otherwise specified” applies to cases such as
the swappable with requirements ([[swappable.requirements]](swappable.requirements "16.4.4.3Swappable requirements"))[.](#4.sentence-2)
The exception for overloaded operators allows argument-dependent lookup
in cases like that of[ostream_iterator::operator=](ostream.iterator.ops#lib:ostream_iterator,operator= "24.6.3.3Operations[ostream.iterator.ops]"):
*Effects*: **out_stream* << value;if (*delim* != 0)**out_stream* << *delim*;return *this;
— *end note*]
[155)](#footnote-155)[155)](#footnoteref-155)
A valid C++ program always
calls the expected library non-member function[.](#footnote-155.sentence-1)
An implementation can
also define additional non-member functions that would otherwise not
be called by a valid C++ program[.](#footnote-155.sentence-2)