Skip to content

Commit 93e0356

Browse files
Dawn Perchikzygoloid
authored andcommitted
CWG2381 Composite pointer type of pointers to plain and noexcept member functions
1 parent 9788ef3 commit 93e0356

File tree

1 file changed

+26
-7
lines changed

1 file changed

+26
-7
lines changed

source/expressions.tex

Lines changed: 26 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -380,8 +380,23 @@
380380
respectively;
381381

382382
\item
383-
if \tcode{T1} is ``pointer to member of \tcode{C1} of type \cvqual{cv1} \tcode{U1}'' and \tcode{T2} is
384-
``pointer to member of \tcode{C2} of type \cvqual{cv2} \tcode{U2}'' where \tcode{C1} is
383+
if \tcode{T1} or \tcode{T2} is
384+
``pointer to member of \tcode{C1} of type function'',
385+
the other type is
386+
``pointer to member of \tcode{C2} of type \tcode{noexcept} function'', and
387+
\tcode{C1} is reference-related to \tcode{C1} or
388+
\tcode{C2} is reference-related to \tcode{C1}\iref{dcl.init.ref},
389+
where the function types are otherwise the same,
390+
``pointer to member of \tcode{C2} of type function'' or
391+
``pointer to member of \tcode{C1} of type function'', respectively;
392+
393+
\item
394+
if \tcode{T1} is
395+
``pointer to member of \tcode{C1} of type \cvqual{cv1} \tcode{U}'' and
396+
\tcode{T2} is
397+
``pointer to member of \tcode{C2} of type \cvqual{cv2} \tcode{U}'',
398+
for some non-function type \tcode{U},
399+
where \tcode{C1} is
385400
reference-related to \tcode{C2} or \tcode{C2} is reference-related to
386401
\tcode{C1}\iref{dcl.init.ref}, the cv-combined type of \tcode{T2} and \tcode{T1} or the cv-combined type
387402
of \tcode{T1} and \tcode{T2}, respectively;
@@ -5901,9 +5916,11 @@
59015916
\end{itemize}
59025917

59035918
\pnum
5904-
If at least one of the operands is a pointer to member, pointer-to-member
5905-
conversions\iref{conv.mem} and qualification
5906-
conversions\iref{conv.qual} are performed on both operands to bring them to
5919+
If at least one of the operands is a pointer to member,
5920+
pointer-to-member conversions\iref{conv.mem},
5921+
function pointer conversions\iref{conv.fctptr}, and
5922+
qualification conversions\iref{conv.qual}
5923+
are performed on both operands to bring them to
59075924
their composite pointer type\iref{expr.type}.
59085925
Comparing pointers to members is defined as follows:
59095926

@@ -6275,8 +6292,10 @@
62756292
pointer type.
62766293

62776294
\item One or both of the second and third operands have pointer-to-member type;
6278-
pointer to member conversions\iref{conv.mem} and qualification
6279-
conversions\iref{conv.qual} are performed to bring them to their composite
6295+
pointer to member conversions\iref{conv.mem},
6296+
function pointer conversions\iref{conv.fctptr}, and
6297+
qualification conversions\iref{conv.qual}
6298+
are performed to bring them to their composite
62806299
pointer type\iref{expr.type}. The result is of the composite pointer type.
62816300

62826301
\item

0 commit comments

Comments
 (0)