Skip to content

[expr.static.cast], [over.call.object] Replace 'greater cv-qualification' with 'more cv-qualified' #7050

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 8 additions & 12 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 equally as or more cv-qualified than \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 equally as or more cv-qualified than \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 equally as or more cv-qualified than \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 equally as or more cv-qualified than \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 Expand Up @@ -7038,7 +7034,7 @@
\begin{itemize}
\item if \tcode{T1} and \tcode{T2} are the same class type
(ignoring cv-qualification) and
\tcode{T2} is at least as cv-qualified as \tcode{T1},
\tcode{T2} is equally as or more cv-qualified than \tcode{T1},
the target type is \tcode{T2},

\item otherwise, if \tcode{T2} is a base class of \tcode{T1},
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 equally as or more cv-qualified than \cv{}~\tcode{T},
and where
\grammarterm{conversion-type-id}
denotes the type ``pointer to function
Expand Down
Loading