Skip to content

Commit b369c92

Browse files
committed
[over.over] Extract the non-template function case from the description
of the target type and rearrange so that it better parallels the function template specialization case.
1 parent 7fc7106 commit b369c92

File tree

1 file changed

+18
-12
lines changed

1 file changed

+18
-12
lines changed

source/overloading.tex

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3141,18 +3141,12 @@
31413141
\indextext{overloaded function!address of}
31423142

31433143
\pnum
3144-
A use of a function name without arguments is resolved
3145-
to a function, a pointer to function or a pointer to
3146-
member function for a specific function from a set of selected functions,
3144+
A use of a function name without arguments is resolved to
3145+
a function, a pointer to function, or a pointer to member function
3146+
for a specific function
3147+
that is chosen from a set of selected functions
3148+
determined based on the target type required in the context (if any),
31473149
as described below.
3148-
A function with type \tcode{F} is selected for the function type \tcode{FT}
3149-
of the target type required in the context if \tcode{F}
3150-
(after possibly applying the function pointer conversion\iref{conv.fctptr})
3151-
is identical to \tcode{FT}.
3152-
\begin{note}
3153-
That is, the class of which the function is a member is ignored when matching a
3154-
pointer-to-member-function type.
3155-
\end{note}
31563150
The target can be
31573151
\begin{itemize}
31583152
\item
@@ -3173,13 +3167,24 @@
31733167
a non-type
31743168
\grammarterm{template-parameter}\iref{temp.arg.nontype}.
31753169
\end{itemize}
3176-
If there is no target, all functions named are selected.
31773170
The function name can be preceded by the \tcode{\&} operator.
31783171
\begin{note}
31793172
Any redundant set of parentheses surrounding the function name is
31803173
ignored\iref{expr.prim.paren}.
31813174
\end{note}
31823175

3176+
\pnum
3177+
If there is no target, all non-template functions named are selected.
3178+
Otherwise, a non-template function with type \tcode{F}
3179+
is selected for the function type \tcode{FT} of the target type
3180+
if \tcode{F}
3181+
(after possibly applying the function pointer conversion\iref{conv.fctptr})
3182+
is identical to \tcode{FT}.
3183+
\begin{note}
3184+
That is, the class of which the function is a member is ignored when matching a
3185+
pointer-to-member-function type.
3186+
\end{note}
3187+
31833188
\pnum
31843189
For each function template designated by the name,
31853190
template argument deduction is done\iref{temp.deduct.funcaddr}, and
@@ -3208,6 +3213,7 @@
32083213
reference to function type.
32093214
Non-static member functions match targets of
32103215
pointer-to-member-function type.
3216+
%% FIXME: Should this only apply after the eliminations in the next paragraph?
32113217
If a non-static member function is selected, the reference to the overloaded
32123218
function name is required to have the form of a pointer to member as
32133219
described in~\ref{expr.unary.op}.

0 commit comments

Comments
 (0)