|
3141 | 3141 | \indextext{overloaded function!address of} |
3142 | 3142 |
|
3143 | 3143 | \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), |
3147 | 3149 | 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} |
3156 | 3150 | The target can be |
3157 | 3151 | \begin{itemize} |
3158 | 3152 | \item |
|
3173 | 3167 | a non-type |
3174 | 3168 | \grammarterm{template-parameter}\iref{temp.arg.nontype}. |
3175 | 3169 | \end{itemize} |
3176 | | -If there is no target, all functions named are selected. |
3177 | 3170 | The function name can be preceded by the \tcode{\&} operator. |
3178 | 3171 | \begin{note} |
3179 | 3172 | Any redundant set of parentheses surrounding the function name is |
3180 | 3173 | ignored\iref{expr.prim.paren}. |
3181 | 3174 | \end{note} |
3182 | 3175 |
|
| 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 | + |
3183 | 3188 | \pnum |
3184 | 3189 | For each function template designated by the name, |
3185 | 3190 | template argument deduction is done\iref{temp.deduct.funcaddr}, and |
|
3208 | 3213 | reference to function type. |
3209 | 3214 | Non-static member functions match targets of |
3210 | 3215 | pointer-to-member-function type. |
| 3216 | +%% FIXME: Should this only apply after the eliminations in the next paragraph? |
3211 | 3217 | If a non-static member function is selected, the reference to the overloaded |
3212 | 3218 | function name is required to have the form of a pointer to member as |
3213 | 3219 | described in~\ref{expr.unary.op}. |
|
0 commit comments