Skip to content

Commit 538a55b

Browse files
burblebeetkoeppe
authored andcommitted
CWG2906 Lvalue-to-rvalue conversion of class types for conditional operator
1 parent c7193c9 commit 538a55b

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

source/expressions.tex

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7154,30 +7154,32 @@
71547154
subclause.
71557155

71567156
\pnum
7157-
Lvalue-to-rvalue\iref{conv.lval}, array-to-pointer\iref{conv.array},
7157+
Array-to-pointer\iref{conv.array}
71587158
and function-to-pointer\iref{conv.func} standard conversions are
71597159
performed on the second and third operands. After those conversions, one
71607160
of the following shall hold:
71617161

71627162
\begin{itemize}
71637163
\item The second and third operands have the same type; the result is of
7164-
that type and the result object is initialized using the selected operand.
7164+
that type and the result is copy-initialized using the selected operand.
71657165

71667166
\item The second and third operands have arithmetic or enumeration type;
71677167
the usual arithmetic conversions\iref{expr.arith.conv} are performed to bring them to a common
71687168
type, and the result is of that type.
71697169

71707170
\item One or both of the second and third operands have pointer type;
7171-
pointer conversions\iref{conv.ptr},
7172-
function pointer conversions\iref{conv.fctptr}, and
7171+
lvalue-to-rvalue\iref{conv.lval},
7172+
pointer\iref{conv.ptr},
7173+
function pointer\iref{conv.fctptr}, and
71737174
qualification conversions\iref{conv.qual}
71747175
are performed to bring them to their
71757176
composite pointer type\iref{expr.type}. The result is of the composite
71767177
pointer type.
71777178

71787179
\item One or both of the second and third operands have pointer-to-member type;
7179-
pointer to member conversions\iref{conv.mem},
7180-
function pointer conversions\iref{conv.fctptr}, and
7180+
lvalue-to-rvalue\iref{conv.lval},
7181+
pointer to member\iref{conv.mem},
7182+
function pointer\iref{conv.fctptr}, and
71817183
qualification conversions\iref{conv.qual}
71827184
are performed to bring them to their composite
71837185
pointer type\iref{expr.type}. The result is of the composite pointer type.

0 commit comments

Comments
 (0)