Skip to content

Commit 54dc015

Browse files
jensmaurerzygoloid
authored andcommitted
[dcl.fct,expr.ref] Fix description of class member access expressions
involving non-static member functions.
1 parent f3660cb commit 54dc015

File tree

2 files changed

+29
-27
lines changed

2 files changed

+29
-27
lines changed

source/declarations.tex

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3223,13 +3223,17 @@
32233223
is
32243224
``\placeholder{derived-declarator-type-list}
32253225
\opt{\tcode{noexcept}}
3226-
function of
3227-
(\grammarterm{parameter-declaration-clause})
3226+
function of parameter-type-list
32283227
\opt{\grammarterm{cv-qualifier-seq}} \opt{\grammarterm{ref-qualifier}}
3229-
returning \tcode{T}'',
3230-
where the optional \tcode{noexcept} is present
3231-
if and only if
3228+
returning \tcode{T}'', where
3229+
\begin{itemize}
3230+
\item
3231+
the parameter-type-list is derived from
3232+
the \grammarterm{parameter-declaration-clause} as described below and
3233+
\item
3234+
the optional \tcode{noexcept} is present if and only if
32323235
the exception specification\iref{except.spec} is non-throwing.
3236+
\end{itemize}
32333237
The optional \grammarterm{attribute-specifier-seq}
32343238
appertains to the function type.
32353239

@@ -3259,14 +3263,19 @@
32593263
is
32603264
``\placeholder{derived-declarator-type-list}
32613265
\opt{\tcode{noexcept}}
3262-
function of
3263-
(\grammarterm{parameter-declaration-clause})
3266+
function of parameter-type-list
32643267
\opt{\grammarterm{cv-qualifier-seq}} \opt{\grammarterm{ref-qualifier}}
3265-
returning \tcode{U}'',
3266-
where \tcode{U} is the type specified by
3267-
the \grammarterm{trailing-return-type}, and
3268-
where the optional \tcode{noexcept} is present if and only if
3268+
returning \tcode{U}'', where
3269+
\begin{itemize}
3270+
\item
3271+
the parameter-type-list is derived from
3272+
the \grammarterm{parameter-declaration-clause} as described below,
3273+
\item
3274+
\tcode{U} is the type specified by the \grammarterm{trailing-return-type}, and
3275+
\item
3276+
the optional \tcode{noexcept} is present if and only if
32693277
the exception specification is non-throwing.
3278+
\end{itemize}
32703279
The optional \grammarterm{attribute-specifier-seq}
32713280
appertains to the function type.
32723281

source/expressions.tex

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3276,30 +3276,23 @@
32763276
\tcode{mutable} member, then the type of \tcode{E1.E2} is
32773277
``\cvqual{cq12} \cvqual{vq12} \tcode{T}''.
32783278

3279-
\item If \tcode{E2} is a (possibly overloaded) member function, function
3280-
overload resolution\iref{over.match} is used to determine whether
3281-
\tcode{E1.E2} refers to a static or a non-static member function.
3279+
\item If \tcode{E2} is a (possibly overloaded) member function,
3280+
function overload resolution\iref{over.match}
3281+
is used to select the function to which \tcode{E2} refers.
3282+
The type of \tcode{E1.E2} is the type of \tcode{E2}
3283+
and \tcode{E1.E2} refers to the function referred to by \tcode{E2}.
32823284

32833285
\begin{itemize}
3284-
\item If it refers to a static member function and the type of
3285-
\tcode{E2} is ``function of parameter-type-list returning \tcode{T}'',
3286-
then \tcode{E1.E2} is an lvalue; the expression designates the static
3287-
member function. The type of \tcode{E1.E2} is the same type as that of
3288-
\tcode{E2}, namely ``function of parameter-type-list returning
3289-
\tcode{T}''.
3286+
\item If \tcode{E2} refers to a static member function,
3287+
\tcode{E1.E2} is an lvalue.
32903288

3291-
\item Otherwise, if \tcode{E1.E2} refers to a non-static member
3292-
function and the type of \tcode{E2} is ``function of
3293-
parameter-type-list \cv{} \opt{\grammarterm{ref-qualifier}} returning \tcode{T}'', then
3294-
\tcode{E1.E2} is a prvalue. The expression designates a
3295-
non-static member function. The expression can be used only as the
3289+
\item Otherwise (when \tcode{E2} refers to a non-static member function),
3290+
\tcode{E1.E2} is a prvalue. The expression can be used only as the
32963291
left-hand operand of a member function call\iref{class.mfct}.
32973292
\begin{note}
32983293
Any redundant set of parentheses surrounding the expression
32993294
is ignored\iref{expr.prim.paren}.
33003295
\end{note}
3301-
The type of \tcode{E1.E2} is
3302-
``function of parameter-type-list \cv{} returning \tcode{T}''.
33033296
\end{itemize}
33043297

33053298
\item If \tcode{E2} is a nested type, the expression \tcode{E1.E2} is

0 commit comments

Comments
 (0)