Skip to content

Commit 7279c10

Browse files
committed
Remove \tcode from 'const object'.
Fixes #469.
1 parent 801fb0b commit 7279c10

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
@@ -446,7 +446,7 @@
446446
template specialization\iref{temp.over}, except that a name can refer to
447447
\begin{itemize}
448448
\item
449-
a non-volatile \tcode{const} object with internal or no linkage if the object
449+
a non-volatile const object with internal or no linkage if the object
450450
\begin{itemize}
451451
\item has the same literal type in all definitions of \tcode{D},
452452
\item is initialized with a constant expression\iref{expr.const},
@@ -2926,9 +2926,9 @@
29262926
\end{example}
29272927

29282928
\pnum
2929-
Creating a new object within the storage that a \tcode{const} complete
2929+
Creating a new object within the storage that a const complete
29302930
object with static, thread, or automatic storage duration occupies,
2931-
or within the storage that such a \tcode{const} object used to occupy before
2931+
or within the storage that such a const object used to occupy before
29322932
its lifetime ended, results in undefined behavior.
29332933
\begin{example}
29342934
\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}\iref{dcl.type.cv}.
489+
the object is const\iref{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@const-object!undefined change to}%
11581158
Except that any class member declared \tcode{mutable}\iref{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\iref{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
@@ -4525,7 +4525,7 @@
45254525
\tcode{E1.E2} given in~\ref{expr.ref}.
45264526
\begin{note}
45274527
It is not possible to use a pointer to member that refers to a
4528-
\tcode{mutable} member to modify a \tcode{const} class object. For
4528+
\tcode{mutable} member to modify a const class object. For
45294529
example,
45304530

45314531
\begin{codeblock}
@@ -4537,7 +4537,7 @@
45374537
{
45384538
const S cs;
45394539
int S::* pm = &S::i; // \tcode{pm} refers to \tcode{mutable} member \tcode{S::i}
4540-
cs.*pm = 88; // ill-formed: \tcode{cs} is a \tcode{const} object
4540+
cs.*pm = 88; // ill-formed: \tcode{cs} is a const object
45414541
}
45424542
\end{codeblock}
45434543
\end{note}

source/intro.tex

+1-1
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,7 @@
494494
\pnum
495495
Certain other operations are described in this document as
496496
undefined (for example, the effect of
497-
attempting to modify a \tcode{const} object).
497+
attempting to modify a const object).
498498
\begin{note} This document imposes no requirements on the
499499
behavior of programs that contain undefined behavior. \end{note}
500500

source/templates.tex

+1-1
Original file line numberDiff line numberDiff line change
@@ -4148,7 +4148,7 @@
41484148
\item constant expression evaluation\iref{expr.const} within the template
41494149
instantiation uses
41504150
\begin{itemize}
4151-
\item the value of a \tcode{const} object of integral or unscoped enumeration type or
4151+
\item the value of a const object of integral or unscoped enumeration type or
41524152
\item the value of a \tcode{constexpr} object or
41534153
\item the value of a reference or
41544154
\item the definition of a constexpr function,

0 commit comments

Comments
 (0)