Skip to content

Commit 67dab85

Browse files
committed
[expr.static.cast], [expr.cond], [over.call.object] Replace 'greater cv-qualification' with 'more cv-qualified'
1 parent 4b3f32a commit 67dab85

File tree

2 files changed

+11
-16
lines changed

2 files changed

+11
-16
lines changed

source/expressions.tex

+8-12
Original file line numberDiff line numberDiff line change
@@ -4049,9 +4049,8 @@
40494049
An lvalue of type ``\cvqual{cv1} \tcode{B}'', where \tcode{B} is a class
40504050
type, can be cast to type ``reference to \cvqual{cv2} \tcode{D}'', where
40514051
\tcode{D} is a complete class derived\iref{class.derived} from \tcode{B},
4052-
if \cvqual{cv2} is the
4053-
same cv-qualification as, or greater cv-qualification than,
4054-
\cvqual{cv1}. If \tcode{B} is a virtual base class of \tcode{D}
4052+
if \cvqual{cv2}~\tcode{D} is equally as or more cv-qualified than \cvqual{cv1}~\tcode{B}.
4053+
If \tcode{B} is a virtual base class of \tcode{D}
40554054
or a base class of a virtual base class of \tcode{D},
40564055
or if no valid standard conversion from ``pointer to \tcode{D}''
40574056
to ``pointer to \tcode{B}'' exists\iref{conv.ptr}, the program is ill-formed.
@@ -4214,10 +4213,8 @@
42144213
A prvalue of type ``pointer to \cvqual{cv1} \tcode{B}'', where \tcode{B}
42154214
is a class type, can be converted to a prvalue of type ``pointer to
42164215
\cvqual{cv2} \tcode{D}'',
4217-
where \tcode{D} is a complete class derived\iref{class.derived}
4218-
from \tcode{B},
4219-
if \cvqual{cv2} is the same cv-qualification as,
4220-
or greater cv-qualification than, \cvqual{cv1}.
4216+
where \tcode{D} is a complete class derived\iref{class.derived} from \tcode{B},
4217+
if \cvqual{cv2}~\tcode{D} is equally as or more cv-qualified than \cvqual{cv1}~\tcode{B}.
42214218
If \tcode{B} is a virtual base class of \tcode{D} or
42224219
a base class of a virtual base class of \tcode{D}, or
42234220
if no valid standard conversion from ``pointer to \tcode{D}''
@@ -4236,8 +4233,7 @@
42364233
\tcode{B} of type \cvqual{cv2} \tcode{T}'', where
42374234
\tcode{D} is a complete class type and
42384235
\tcode{B} is a base class\iref{class.derived} of \tcode{D},
4239-
if \cvqual{cv2} is the same cv-qualification
4240-
as, or greater cv-qualification than, \cvqual{cv1}.
4236+
if \cvqual{cv2}~\tcode{T} is equally as or more cv-qualified than \cvqual{cv1}~\tcode{T}.
42414237
\begin{note}
42424238
Function types (including those used in pointer-to-member-function types)
42434239
are never cv-qualified\iref{dcl.fct}.
@@ -4261,8 +4257,8 @@
42614257
\pnum
42624258
A prvalue of type ``pointer to \cvqual{cv1} \keyword{void}'' can be
42634259
converted to a prvalue of type ``pointer to \cvqual{cv2} \tcode{T}'',
4264-
where \tcode{T} is an object type and \cvqual{cv2} is the same
4265-
cv-qualification as, or greater cv-qualification than, \cvqual{cv1}.
4260+
where \tcode{T} is an object type,
4261+
and \cvqual{cv2}~\tcode{T} is equally as or more cv-qualified than \cvqual{cv1}~\tcode{void}.
42664262
If the original pointer value represents the address
42674263
\tcode{A} of a byte in memory and
42684264
\tcode{A} does not satisfy the alignment requirement of \tcode{T},
@@ -7038,7 +7034,7 @@
70387034
\begin{itemize}
70397035
\item if \tcode{T1} and \tcode{T2} are the same class type
70407036
(ignoring cv-qualification) and
7041-
\tcode{T2} is at least as cv-qualified as \tcode{T1},
7037+
\tcode{T2} is equally as or more cv-qualified than \tcode{T1},
70427038
the target type is \tcode{T2},
70437039

70447040
\item otherwise, if \tcode{T2} is a base class of \tcode{T1},

source/overloading.tex

+3-4
Original file line numberDiff line numberDiff line change
@@ -546,10 +546,9 @@
546546
\begin{ncsimplebnf}
547547
\keyword{operator} conversion-type-id \terminal{(\,)} \opt{cv-qualifier-seq} \opt{ref-qualifier} \opt{noexcept-specifier} \opt{attribute-specifier-seq} \terminal{;}
548548
\end{ncsimplebnf}
549-
where the optional
550-
\grammarterm{cv-qualifier-seq}
551-
is the same cv-qualification as, or a greater cv-qualification than,
552-
\cv{},
549+
where if \grammarterm{cv-qualifier-seq} is provided,
550+
\grammarterm{cv-qualifier-seq}~\grammarterm{conversion-type-id}
551+
is equally as or more cv-qualified than \cv{}~\tcode{T},
553552
and where
554553
\grammarterm{conversion-type-id}
555554
denotes the type ``pointer to function

0 commit comments

Comments
 (0)