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

40 lines
1.2 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.

[hidden.friends]
# 16 Library introduction [[library]](./#library)
## 16.4 Library-wide requirements [[requirements]](requirements#hidden.friends)
### 16.4.6 Conforming implementations [[conforming]](conforming#hidden.friends)
#### 16.4.6.6 Friend functions [hidden.friends]
[1](#1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/lib-intro.tex#L3709)
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[.](#1.sentence-1)
[*Note [1](#note-1)*:
In particular,
a conforming implementation does not provide
any additional declarations of that function or function template
at namespace scope[.](#1.sentence-2)
— *end note*]
[*Note [2](#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]](basic.lookup.unqual "6.5.3Unqualified name lookup")) nor
to qualified lookup ([[basic.lookup.qual]](basic.lookup.qual "6.5.5Qualified name lookup"))[.](#1.sentence-3)
— *end note*]