From 3a08ebd3f8414ac9159ff02b71e8ef67f7cf9fdc Mon Sep 17 00:00:00 2001 From: Jens Maurer Date: Wed, 13 Nov 2019 21:40:22 +0100 Subject: [PATCH] P1965R0 Blanket Wording for Specifying "Hidden Friends" Also fixes NB DE 165 and LWG3239 --- source/lib-intro.tex | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/source/lib-intro.tex b/source/lib-intro.tex index 996464a32b..a372063929 100644 --- a/source/lib-intro.tex +++ b/source/lib-intro.tex @@ -3122,6 +3122,29 @@ or add additional signatures for a member function name. \end{note} +\rSec3[hidden.friends]{Friend functions} + +\pnum +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. +\begin{note} +In particular, +an implementation is not allowed to provide +an additional declaration of that function or function template +at namespace scope. +\end{note} +\begin{note} +Such a friend function or function template declaration +is known as a hidden friend, +as it is visible neither +to ordinary unqualified lookup\iref{basic.lookup.unqual} nor +to qualified lookup\iref{basic.lookup.qual}. +\end{note} + \rSec3[constexpr.functions]{Constexpr functions and constructors} \pnum