Skip to content

Commit ab94dc8

Browse files
committed
CWG3114 Indirect base classes for class member access with direct base class relationship
1 parent 0d504e8 commit ab94dc8

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

source/expressions.tex

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4311,17 +4311,18 @@
43114311
whose value is the value of the enumerator.
43124312

43134313
\item
4314-
Otherwise, if \tcode{E2} designates a direct base class relationship $(D, B)$
4315-
and the type of \tcode{E1} is \cv{} \tcode{T},
4314+
Otherwise, if \tcode{E2} designates a direct base class relationship $(D, B)$ and
4315+
$D$ is either the cv-unqualified class type of \tcode{E1} or a base class thereof,
4316+
let \cv{} be the cv-qualification of the type of \tcode{E1}.
4317+
\tcode{E1} is implicitly converted to the type ``reference to \cv{}~\tcode{$D$}''
4318+
(where the reference is an lvalue reference if \tcode{E1} is an lvalue
4319+
and an rvalue reference otherwise) and
43164320
the expression designates the direct base class subobject of type $B$
4317-
of the object designated by \tcode{E1}.
4321+
of the object designated by the converted \tcode{E1}.
43184322
If \tcode{E1} is an lvalue,
43194323
then \tcode{E1.E2} is an lvalue;
43204324
otherwise, \tcode{E1.E2} is an xvalue.
4321-
The type of \tcode{E1.E2} is ``\cv{} \tcode{$B$}''.
4322-
\begin{note}
4323-
This can only occur in an expression of the form \tcode{e1.[:e2:]}.
4324-
\end{note}
4325+
The type of \tcode{E1.E2} is \cv{}~\tcode{$B$}.
43254326
\begin{example}
43264327
\begin{codeblock}
43274328
struct B {

0 commit comments

Comments
 (0)