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 4860
4860
\end {codeblock }
4861
4861
\end {example }
4862
4862
4863
- \pnum
4864
- \indextext {friend function!linkage of}%
4865
- A function first declared in a friend declaration
4866
- has the linkage of the namespace of which it is a member\iref {basic.link }.
4867
- Otherwise, the function retains its previous linkage\iref {dcl.stc }.
4868
-
4869
4863
\pnum
4870
4864
\indextext {declaration!overloaded name and \tcode {friend}}%
4871
4865
\begin {note }
You can’t perform that action at this time.
0 commit comments