Skip to content

Commit 0e5791a

Browse files
authored
Merge 2019-11 LWG Motion 5
P1965R0 Blanket Wording for Specifying "Hidden Friends"
2 parents 38e5d6d + 3a08ebd commit 0e5791a

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

source/lib-intro.tex

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3122,6 +3122,29 @@
31223122
or add additional signatures for a member function name.
31233123
\end{note}
31243124

3125+
\rSec3[hidden.friends]{Friend functions}
3126+
3127+
\pnum
3128+
Whenever this document specifies
3129+
a friend declaration of a function or function template
3130+
within a class or class template definition,
3131+
that declaration shall be
3132+
the only declaration of that function or function template
3133+
provided by an implementation.
3134+
\begin{note}
3135+
In particular,
3136+
an implementation is not allowed to provide
3137+
an additional declaration of that function or function template
3138+
at namespace scope.
3139+
\end{note}
3140+
\begin{note}
3141+
Such a friend function or function template declaration
3142+
is known as a hidden friend,
3143+
as it is visible neither
3144+
to ordinary unqualified lookup\iref{basic.lookup.unqual} nor
3145+
to qualified lookup\iref{basic.lookup.qual}.
3146+
\end{note}
3147+
31253148
\rSec3[constexpr.functions]{Constexpr functions and constructors}
31263149

31273150
\pnum

0 commit comments

Comments
 (0)