File tree Expand file tree Collapse file tree 2 files changed +18
-6
lines changed Expand file tree Collapse file tree 2 files changed +18
-6
lines changed Original file line number Diff line number Diff line change 2746
2746
has its linkage determined as follows:
2747
2747
\begin {itemize }
2748
2748
\item
2749
+ \indextext {friend function!linkage of}%
2750
+ if the entity is a function or function template
2751
+ first declared in a friend declaration and
2752
+ that declaration is a definition and
2753
+ the enclosing class is defined within an \grammarterm {export-declaration},
2754
+ the name has the same linkage, if any,
2755
+ as the name of the enclosing class\iref {class.friend };
2756
+ \item
2757
+ otherwise,
2758
+ \indextext {friend function!linkage of}%
2759
+ if the entity is a function or function template
2760
+ declared in a friend declaration and
2761
+ a corresponding non-friend declaration is reachable,
2762
+ % FIXME: Which declaration is "that prior declaration"?
2763
+ % FIXME: "prior" with respect to what? And what about dependent lookup?
2764
+ the name has the linkage determined from that prior declaration,
2765
+ \item
2766
+ otherwise,
2749
2767
if the enclosing namespace has internal linkage,
2750
2768
the name has internal linkage;
2751
2769
\item
Original file line number Diff line number Diff line change 4857
4857
\end {codeblock }
4858
4858
\end {example }
4859
4859
4860
- \pnum
4861
- \indextext {friend function!linkage of}%
4862
- A function first declared in a friend declaration
4863
- has the linkage of the namespace of which it is a member\iref {basic.link }.
4864
- Otherwise, the function retains its previous linkage\iref {dcl.stc }.
4865
-
4866
4860
\pnum
4867
4861
\indextext {declaration!overloaded name and \tcode {friend}}%
4868
4862
\begin {note }
You can’t perform that action at this time.
0 commit comments