Skip to content

Commit

Permalink
[expr.dynamic.cast] Remove redundant statements on casting away const…
Browse files Browse the repository at this point in the history
…ness

and fix the null pointer provision.
  • Loading branch information
jensmaurer committed Feb 19, 2018
1 parent 5a98cbf commit 451f023
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions source/expressions.tex
Expand Up @@ -2653,14 +2653,15 @@
result is an xvalue of the type referred to by \tcode{T}.

\pnum
If the type of \tcode{v} is the same as \tcode{T}, or it is
the same as \tcode{T} except that the class object type in \tcode{T} is
more cv-qualified than the class object type in \tcode{v}, the result is
\tcode{v} (converted if necessary).
If the value of \tcode{v} is a null pointer value in the pointer case
and the conditions for \tcode{T} and the type of \tcode{v} specified
in the following paragraphs are satisfied,
the result is the null pointer value of type \tcode{T}.

\pnum
If the value of \tcode{v} is a null pointer value in the pointer case,
the result is the null pointer value of type \tcode{T}.
If the type of \tcode{v} is the same as \tcode{T} (ignoring cv-qualifications),
the result is
\tcode{v} (converted if necessary).

\pnum
If \tcode{T} is ``pointer to \cvqual{cv1} \tcode{B}'' and \tcode{v} has
Expand All @@ -2675,8 +2676,7 @@
\tcode{v} can contain other \tcode{B} objects as base classes, but these
are ignored.}
In both the pointer and
reference cases, the program is ill-formed if \cvqual{cv2} has greater
cv-qualification than \cvqual{cv1} or if \tcode{B} is an inaccessible or
reference cases, the program is ill-formed if \tcode{B} is an inaccessible or
ambiguous base class of \tcode{D}.
\begin{example}

Expand Down

0 comments on commit 451f023

Please sign in to comment.