Skip to content

Commit 12fdd48

Browse files
author
Stefanus Du Toit
committed
CWG1428 DR
"Dynamic const objects"
1 parent 59b39a1 commit 12fdd48

1 file changed

Lines changed: 21 additions & 15 deletions

File tree

source/basic.tex

Lines changed: 21 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3914,16 +3914,27 @@
39143914
\term{volatile-qualified} version, and a
39153915
\term{const-volatile-qualified} version. The term
39163916
\term{object type}~(\ref{intro.object}) includes the cv-qualifiers
3917-
specified when the object is created. The presence of a \tcode{const}
3918-
specifier in a \grammarterm{decl-specifier-seq} declares an object of
3919-
\term{const-qualified object type}; such
3920-
object is called a \term{const object}. The presence of a
3921-
\tcode{volatile} specifier in a \grammarterm{decl-specifier-seq} declares
3922-
an object of \grammarterm{volatile-qualified} \term{object type}; such object
3923-
is called a \term{volatile object}. The presence of both \grammarterm{cv-qualifiers} in a
3924-
\grammarterm{decl-specifier-seq} declares an object of
3925-
\term{const-volatile-qualified object type};
3926-
such object is called a \term{const volatile object}. The cv-qualified or
3917+
specified in the \grammarterm{decl-specifier-seq}~(\ref{dcl.spec}),
3918+
\grammarterm{declarator} (Clause~\ref{dcl.decl}),
3919+
\grammarterm{type-id}~(\ref{dcl.name}), or
3920+
\grammarterm{new-type-id}~(\ref{expr.new}) when the object is created.
3921+
3922+
\begin{itemize}
3923+
\item A \term{const object} is an object of type \tcode{const T} or a
3924+
non-mutable subobject of such an object.
3925+
3926+
\item A \term{volatile object} is an object of type
3927+
\tcode{volatile T}, a subobject of such an object, or a mutable
3928+
subobject of a const volatile object.
3929+
3930+
\item A \term{const volatile object} is an object of type
3931+
\tcode{const volatile T}, a non-mutable subobject of such an object,
3932+
a const subobject of a volatile object, or a non-mutable volatile
3933+
subobject of a const object.
3934+
3935+
\end{itemize}
3936+
3937+
The cv-qualified or
39273938
cv-unqualified versions of a type
39283939
are distinct types; however, they shall have the same representation and
39293940
alignment requirements~(\ref{basic.align}).\footnote{The same representation
@@ -3939,11 +3950,6 @@
39393950
not the array type~(\ref{dcl.array}).
39403951

39413952
\pnum
3942-
\indextext{class~object!\idxcode{const}}%
3943-
Each non-static, non-mutable, non-reference data member of a
3944-
const-qualified class object is const-qual\-i\-fied, each non-static,
3945-
non-reference data member of a volatile-qualified class object is
3946-
volatile-qualified and similarly for members of a const-volatile class.
39473953
See~\ref{dcl.fct} and~\ref{class.this} regarding function
39483954
types that have \grammarterm{cv-qualifier}{s}.
39493955

0 commit comments

Comments
 (0)