Skip to content

Commit

Permalink
[expr.static.cast] Replace 'greater cv-qualification' with 'more cv-q…
Browse files Browse the repository at this point in the history
…ualified'
  • Loading branch information
Eisenwave committed Jun 5, 2024
1 parent 4b3f32a commit 71c0a21
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions source/expressions.tex
Original file line number Diff line number Diff line change
Expand Up @@ -4049,9 +4049,8 @@
An lvalue of type ``\cvqual{cv1} \tcode{B}'', where \tcode{B} is a class
type, can be cast to type ``reference to \cvqual{cv2} \tcode{D}'', where
\tcode{D} is a complete class derived\iref{class.derived} from \tcode{B},
if \cvqual{cv2} is the
same cv-qualification as, or greater cv-qualification than,
\cvqual{cv1}. If \tcode{B} is a virtual base class of \tcode{D}
if \cvqual{cv2} \tcode{D} is at least as cv-qualified as \cvqual{cv1} \tcode{B}.
If \tcode{B} is a virtual base class of \tcode{D}
or a base class of a virtual base class of \tcode{D},
or if no valid standard conversion from ``pointer to \tcode{D}''
to ``pointer to \tcode{B}'' exists\iref{conv.ptr}, the program is ill-formed.
Expand Down Expand Up @@ -4214,10 +4213,8 @@
A prvalue of type ``pointer to \cvqual{cv1} \tcode{B}'', where \tcode{B}
is a class type, can be converted to a prvalue of type ``pointer to
\cvqual{cv2} \tcode{D}'',
where \tcode{D} is a complete class derived\iref{class.derived}
from \tcode{B},
if \cvqual{cv2} is the same cv-qualification as,
or greater cv-qualification than, \cvqual{cv1}.
where \tcode{D} is a complete class derived\iref{class.derived} from \tcode{B},
if \cvqual{cv2} \tcode{D} is at least as cv-qualified as \cvqual{cv1} \tcode{B}.
If \tcode{B} is a virtual base class of \tcode{D} or
a base class of a virtual base class of \tcode{D}, or
if no valid standard conversion from ``pointer to \tcode{D}''
Expand All @@ -4236,8 +4233,7 @@
\tcode{B} of type \cvqual{cv2} \tcode{T}'', where
\tcode{D} is a complete class type and
\tcode{B} is a base class\iref{class.derived} of \tcode{D},
if \cvqual{cv2} is the same cv-qualification
as, or greater cv-qualification than, \cvqual{cv1}.
if \cvqual{cv2} \tcode{T} is at least as cv-qualified as \cvqual{cv1} \tcode{T}.
\begin{note}
Function types (including those used in pointer-to-member-function types)
are never cv-qualified\iref{dcl.fct}.
Expand All @@ -4261,8 +4257,8 @@
\pnum
A prvalue of type ``pointer to \cvqual{cv1} \keyword{void}'' can be
converted to a prvalue of type ``pointer to \cvqual{cv2} \tcode{T}'',
where \tcode{T} is an object type and \cvqual{cv2} is the same
cv-qualification as, or greater cv-qualification than, \cvqual{cv1}.
where \tcode{T} is an object type,
and \cvqual{cv2} \tcode{T} is at least as cv-qualified as \cvqual{cv1} \tcode{void}.
If the original pointer value represents the address
\tcode{A} of a byte in memory and
\tcode{A} does not satisfy the alignment requirement of \tcode{T},
Expand Down

0 comments on commit 71c0a21

Please sign in to comment.