Init
This commit is contained in:
39
cppdraft/hidden/friends.md
Normal file
39
cppdraft/hidden/friends.md
Normal file
@@ -0,0 +1,39 @@
|
||||
[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.3 Unqualified name lookup")) nor
|
||||
to qualified lookup ([[basic.lookup.qual]](basic.lookup.qual "6.5.5 Qualified name lookup"))[.](#1.sentence-3)
|
||||
|
||||
â *end note*]
|
||||
Reference in New Issue
Block a user