Skip to content

Commit e81049e

Browse files
Dawn Perchikzygoloid
authored andcommitted
CWG2365 Confusing specification for dynamic_cast
1 parent e8ed1eb commit e81049e

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

source/expressions.tex

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3366,15 +3366,13 @@
33663366
the result is
33673367
\tcode{v} (converted if necessary).
33683368

3369-
\pnum
3370-
If the value of \tcode{v} is a null pointer value in the pointer case,
3371-
the result is the null pointer value of type \tcode{T}.
3372-
33733369
\pnum
33743370
If \tcode{T} is ``pointer to \cvqual{cv1} \tcode{B}'' and \tcode{v} has
33753371
type ``pointer to \cvqual{cv2} \tcode{D}'' such that \tcode{B} is a base
33763372
class of \tcode{D}, the result is a pointer to the unique \tcode{B}
3377-
subobject of the \tcode{D} object pointed to by \tcode{v}. Similarly, if
3373+
subobject of the \tcode{D} object pointed to by \tcode{v}, or
3374+
a null pointer value if \tcode{v} is a null pointer value.
3375+
Similarly, if
33783376
\tcode{T} is ``reference to \cvqual{cv1} \tcode{B}'' and \tcode{v} has
33793377
type \cvqual{cv2} \tcode{D} such that \tcode{B} is a base class of
33803378
\tcode{D}, the result is the unique \tcode{B} subobject of the \tcode{D}
@@ -3400,6 +3398,9 @@
34003398
Otherwise, \tcode{v} shall be a pointer to or a glvalue of a polymorphic
34013399
type\iref{class.virtual}.
34023400

3401+
\pnum
3402+
If \tcode{v} is a null pointer value, the result is a null pointer value.
3403+
34033404
\pnum
34043405
If \tcode{T} is ``pointer to \cv{} \tcode{void}'', then the result
34053406
is a pointer to the most derived object pointed to by \tcode{v}.

0 commit comments

Comments
 (0)