Skip to content

Commit f4894fa

Browse files
committed
Remove \tcode from 'const object'.
Fixes #469.
1 parent 33316c9 commit f4894fa

File tree

7 files changed

+20
-20
lines changed

7 files changed

+20
-20
lines changed

source/basic.tex

+3-3
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,7 @@
445445
template specialization~(\ref{temp.over}), except that a name can refer to
446446
\begin{itemize}
447447
\item
448-
a non-volatile \tcode{const} object with internal or no linkage if the object
448+
a non-volatile const object with internal or no linkage if the object
449449
\begin{itemize}
450450
\item has the same literal type in all definitions of \tcode{D},
451451
\item is initialized with a constant expression~(\ref{expr.const}),
@@ -3468,9 +3468,9 @@
34683468
\end{example}
34693469

34703470
\pnum
3471-
Creating a new object within the storage that a \tcode{const} complete
3471+
Creating a new object within the storage that a const complete
34723472
object with static, thread, or automatic storage duration occupies,
3473-
or within the storage that such a \tcode{const} object used to occupy before
3473+
or within the storage that such a const object used to occupy before
34743474
its lifetime ended, results in undefined behavior.
34753475
\begin{example}
34763476
\begin{codeblock}

source/compatibility.tex

+4-4
Original file line numberDiff line numberDiff line change
@@ -150,10 +150,10 @@
150150
\change A name of file scope that is explicitly declared \tcode{const}, and not explicitly
151151
declared \tcode{extern}, has internal linkage, while in C it would have external linkage.
152152
\rationale
153-
Because \tcode{const} objects may be used as values during translation in
153+
Because const objects may be used as values during translation in
154154
\Cpp, this feature urges programmers to provide an explicit initializer
155-
for each \tcode{const} object.
156-
This feature allows the user to put \tcode{const} objects in source files that are included
155+
for each const object.
156+
This feature allows the user to put const objects in source files that are included
157157
in more than one translation unit.
158158
\effect
159159
Change to semantics of well-defined feature.
@@ -422,7 +422,7 @@
422422
Seldom.
423423

424424
\ref{dcl.type} [see also \ref{basic.link}]
425-
\change \tcode{const} objects must be initialized in \Cpp but can be left uninitialized in C.
425+
\change const objects must be initialized in \Cpp but can be left uninitialized in C.
426426
\rationale
427427
A const object cannot be assigned to so it must be initialized
428428
to hold a useful value.

source/conversions.tex

+2-2
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@
298298
\begin{note}
299299
If a program could assign a pointer of type \tcode{T**} to a pointer of
300300
type \tcode{const} \tcode{T**} (that is, if line \#1 below were
301-
allowed), a program could inadvertently modify a \tcode{const} object
301+
allowed), a program could inadvertently modify a const object
302302
(as it is done on line \#2). For example,
303303

304304
\begin{codeblock}
@@ -307,7 +307,7 @@
307307
char* pc;
308308
const char** pcc = &pc; // \#1: not allowed
309309
*pcc = &c;
310-
*pc = 'C'; // \#2: modifies a \tcode{const} object
310+
*pc = 'C'; // \#2: modifies a const object
311311
}
312312
\end{codeblock}
313313
\end{note}

source/declarations.tex

+7-7
Original file line numberDiff line numberDiff line change
@@ -486,7 +486,7 @@
486486
The \tcode{mutable} specifier on a class data member nullifies a
487487
\tcode{const} specifier applied to the containing class object and
488488
permits modification of the mutable class member even though the rest of
489-
the object is \tcode{const}~(\ref{dcl.type.cv}).
489+
the object is const~(\ref{dcl.type.cv}).
490490

491491
\rSec2[dcl.fct.spec]{Function specifiers}%
492492
\indextext{specifier!function}%
@@ -943,7 +943,7 @@
943943

944944
\pnum
945945
A \tcode{constexpr} specifier used in an object declaration
946-
declares the object as \tcode{const}.
946+
declares the object as const.
947947
Such an object
948948
shall have literal type and
949949
shall be initialized.
@@ -1154,9 +1154,9 @@
11541154
\end{note}
11551155

11561156
\pnum
1157-
\indextext{const object@\tcode{const}-object!undefined change to}%
1157+
\indextext{const object!undefined change to}%
11581158
Except that any class member declared \tcode{mutable}~(\ref{dcl.stc})
1159-
can be modified, any attempt to modify a \tcode{const} object during its
1159+
can be modified, any attempt to modify a const object during its
11601160
lifetime~(\ref{basic.life}) results in undefined behavior.
11611161
\begin{example}
11621162
\begin{codeblock}
@@ -1170,11 +1170,11 @@
11701170

11711171
int* ip;
11721172
ip = const_cast<int*>(cip); // cast needed to convert \tcode{const int*} to \tcode{int*}
1173-
*ip = 4; // defined: \tcode{*ip} points to \tcode{i}, a non-\tcode{const} object
1173+
*ip = 4; // defined: \tcode{*ip} points to \tcode{i}, a non-const object
11741174

11751175
const int* ciq = new const int (3); // initialized as required
11761176
int* iq = const_cast<int*>(ciq); // cast required
1177-
*iq = 4; // undefined: modifies a \tcode{const} object
1177+
*iq = 4; // undefined: modifies a const object
11781178
\end{codeblock}
11791179
For another example,
11801180
\begin{codeblock}
@@ -1192,7 +1192,7 @@
11921192
y.x.j++; // ill-formed: const-qualified member modified
11931193
Y* p = const_cast<Y*>(&y); // cast away const-ness of \tcode{y}
11941194
p->x.i = 99; // well-formed: \tcode{mutable} member can be modified
1195-
p->x.j = 99; // undefined: modifies a \tcode{const} member
1195+
p->x.j = 99; // undefined: modifies a const subobject
11961196
\end{codeblock}
11971197
\end{example}
11981198

source/expressions.tex

+2-2
Original file line numberDiff line numberDiff line change
@@ -3961,7 +3961,7 @@
39613961
\tcode{E1.E2} given in~\ref{expr.ref}.
39623962
\begin{note}
39633963
It is not possible to use a pointer to member that refers to a
3964-
\tcode{mutable} member to modify a \tcode{const} class object. For
3964+
\tcode{mutable} member to modify a const class object. For
39653965
example,
39663966

39673967
\begin{codeblock}
@@ -3973,7 +3973,7 @@
39733973
{
39743974
const S cs;
39753975
int S::* pm = &S::i; // \tcode{pm} refers to \tcode{mutable} member \tcode{S::i}
3976-
cs.*pm = 88; // ill-formed: \tcode{cs} is a \tcode{const} object
3976+
cs.*pm = 88; // ill-formed: \tcode{cs} is a const object
39773977
}
39783978
\end{codeblock}
39793979
\end{note}

source/intro.tex

+1-1
Original file line numberDiff line numberDiff line change
@@ -796,7 +796,7 @@
796796
\pnum
797797
Certain other operations are described in this International Standard as
798798
undefined (for example, the effect of
799-
attempting to modify a \tcode{const} object).
799+
attempting to modify a const object).
800800
\begin{note} This International Standard imposes no requirements on the
801801
behavior of programs that contain undefined behavior. \end{note}
802802

source/templates.tex

+1-1
Original file line numberDiff line numberDiff line change
@@ -3194,7 +3194,7 @@
31943194
\item constant expression evaluation~(\ref{expr.const}) within the template
31953195
instantiation uses
31963196
\begin{itemize}
3197-
\item the value of a \tcode{const} object of integral or unscoped enumeration type or
3197+
\item the value of a const object of integral or unscoped enumeration type or
31983198
\item the value of a \tcode{constexpr} object or
31993199
\item the value of a reference or
32003200
\item the definition of a constexpr function,

0 commit comments

Comments
 (0)