Skip to content

Commit

Permalink
[expr.static.cast], [over.call.object] Replace 'greater cv-qualificat…
Browse files Browse the repository at this point in the history
…ion' with 'more cv-qualified'
  • Loading branch information
Eisenwave committed Jun 6, 2024
1 parent 4b3f32a commit 237904c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 15 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
7 changes: 3 additions & 4 deletions source/overloading.tex
Original file line number Diff line number Diff line change
Expand Up @@ -546,10 +546,9 @@
\begin{ncsimplebnf}
\keyword{operator} conversion-type-id \terminal{(\,)} \opt{cv-qualifier-seq} \opt{ref-qualifier} \opt{noexcept-specifier} \opt{attribute-specifier-seq} \terminal{;}
\end{ncsimplebnf}
where the optional
\grammarterm{cv-qualifier-seq}
is the same cv-qualification as, or a greater cv-qualification than,
\cv{},
where if \grammarterm{cv-qualifier-seq} is provided,
\grammarterm{cv-qualifier-seq}~\grammarterm{conversion-type-id}
is at least as cv-qualified as \cv{}~\tcode{T},
and where
\grammarterm{conversion-type-id}
denotes the type ``pointer to function
Expand Down

0 comments on commit 237904c

Please sign in to comment.