Skip to content

Commit

Permalink
[util.smartptr] Cleanse text of italics infestation. (#1161)
Browse files Browse the repository at this point in the history
Technical terms should not be in italics everywhere they are referenced.
Common terms such as 'owns' or 'empty' that are used as technical terms
in this subsection only are not italicized or entered into the index.

Fixes #533.
  • Loading branch information
jensmaurer authored and tkoeppe committed Dec 2, 2016
1 parent 39fb88d commit afef023
Showing 1 changed file with 27 additions and 27 deletions.
54 changes: 27 additions & 27 deletions source/utilities.tex
Original file line number Diff line number Diff line change
Expand Up @@ -9334,7 +9334,7 @@
via \tcode{new}. \tcode{shared_ptr} implements semantics of shared ownership;
the last remaining owner of the pointer is responsible for destroying
the object, or otherwise releasing the resources associated with the stored pointer. A
\tcode{shared_ptr} object is \term{empty} if it does not own a pointer.
\tcode{shared_ptr} is said to be empty if it does not own a pointer.

\begin{codeblock}
namespace std {
Expand Down Expand Up @@ -9488,7 +9488,7 @@

\pnum
In the constructor definitions below,
\term{enables \tcode{shared_from_this} with \tcode{p}},
enables \tcode{shared_from_this} with \tcode{p},
for a pointer \tcode{p} of type \tcode{Y*},
means that if \tcode{Y} has an unambiguous and accessible base class
that is a specialization of \tcode{enable_shared_from_this}~(\ref{util.smartptr.enab}),
Expand All @@ -9507,7 +9507,7 @@
\end{itemdecl}

\begin{itemdescr}
\pnum\effects Constructs an \textit{empty} \tcode{shared_ptr} object.
\pnum\effects Constructs an empty \tcode{shared_ptr} object.

\pnum\postconditions \tcode{use_count() == 0 \&\& get() == nullptr}.
\end{itemdescr}
Expand All @@ -9529,7 +9529,7 @@

\pnum\effects When \tcode{T} is not an array type,
constructs a \tcode{shared_ptr} object
that \textit{owns} the pointer \tcode{p}.
that owns the pointer \tcode{p}.
Otherwise, constructs a \tcode{shared_ptr}
that owns \tcode{p} and a deleter of an
unspecified type that calls \tcode{delete[] p}.
Expand Down Expand Up @@ -9564,7 +9564,7 @@
when \tcode{T} is \tcode{U[]}, \tcode{Y(*)[]} shall be convertible to \tcode{T*};
otherwise, \tcode{Y*} shall be convertible to \tcode{T*}.

\pnum\effects Constructs a \tcode{shared_ptr} object that \textit{owns} the
\pnum\effects Constructs a \tcode{shared_ptr} object that owns the
object \tcode{p} and the deleter \tcode{d}.
When \tcode{T} is not an array type,
the first and second constructors enable \tcode{shared_from_this} with \tcode{p}.
Expand All @@ -9587,7 +9587,7 @@
\begin{itemdescr}
\pnum
\effects Constructs a \tcode{shared_ptr} instance that
stores \tcode{p} and \textit{shares ownership} with \tcode{r}.
stores \tcode{p} and shares ownership with \tcode{r}.

\pnum
\postconditions \tcode{get() == p \&\& use_count() == r.use_count()}.
Expand All @@ -9598,7 +9598,7 @@
least until the ownership group of \tcode{r} is destroyed. \end{note}

\pnum
\begin{note} This constructor allows creation of an \textit{empty}
\begin{note} This constructor allows creation of an empty
\tcode{shared_ptr} instance with a non-null stored pointer. \end{note}
\end{itemdescr}

Expand All @@ -9613,9 +9613,9 @@
The second constructor shall not participate in overload resolution unless
\tcode{Y*} is compatible with \tcode{T*}.

\pnum\effects If \tcode{r} is \textit{empty}, constructs
an \textit{empty} \tcode{shared_ptr} object; otherwise, constructs
a \tcode{shared_ptr} object that \textit{shares ownership} with \tcode{r}.
\pnum\effects If \tcode{r} is empty, constructs
an empty \tcode{shared_ptr} object; otherwise, constructs
a \tcode{shared_ptr} object that shares ownership with \tcode{r}.

\pnum\postconditions \tcode{get() == r.get() \&\& use_count() == r.use_count()}.
\end{itemdescr}
Expand All @@ -9636,7 +9636,7 @@

\pnum
\postconditions \tcode{*this} shall contain the old value of
\tcode{r}. \tcode{r} shall be \textit{empty}. \tcode{r.get() == nullptr.}
\tcode{r}. \tcode{r} shall be empty. \tcode{r.get() == nullptr.}
\end{itemdescr}

\indexlibrary{\idxcode{shared_ptr}!constructor}%
Expand All @@ -9648,7 +9648,7 @@
\begin{itemdescr}
\pnum\requires \tcode{Y*} shall be compatible with \tcode{T*}.

\pnum\effects Constructs a \tcode{shared_ptr} object that \textit{shares ownership} with
\pnum\effects Constructs a \tcode{shared_ptr} object that shares ownership with
\tcode{r} and stores a copy of the pointer stored in \tcode{r}.
If an exception is thrown, the constructor has no effect.

Expand Down Expand Up @@ -9686,14 +9686,14 @@
\begin{itemdescr}
\pnum\effects
\begin{itemize}
\item If \tcode{*this} is \textit{empty} or shares ownership with another
\item If \tcode{*this} is empty or shares ownership with another
\tcode{shared_ptr} instance (\tcode{use_count() > 1}), there are no side effects.

\item
Otherwise, if \tcode{*this} \textit{owns} an object
Otherwise, if \tcode{*this} owns an object
\tcode{p} and a deleter \tcode{d}, \tcode{d(p)} is called.

\item Otherwise, \tcode{*this} \textit{owns} a pointer \tcode{p},
\item Otherwise, \tcode{*this} owns a pointer \tcode{p},
and \tcode{delete p} is called.
\end{itemize}
\end{itemdescr}
Expand Down Expand Up @@ -9884,8 +9884,8 @@

\begin{itemdescr}
\pnum\returns The number of \tcode{shared_ptr} objects, \tcode{*this} included,
that \textit{share ownership} with \tcode{*this}, or \tcode{0} when \tcode{*this} is
\textit{empty}.
that share ownership with \tcode{*this}, or \tcode{0} when \tcode{*this} is
empty.

\pnum\sync None.

Expand Down Expand Up @@ -9948,7 +9948,7 @@
\requires The expression \tcode{::new (pv) T(std::forward<Args>(args)...)},
where \tcode{pv} has type \tcode{void*} and points to storage suitable
to hold an object of type \tcode{T}, shall be well formed. \tcode{A} shall
be an \textit{allocator}~(\ref{allocator.requirements}). The copy constructor
be an allocator~(\ref{allocator.requirements}). The copy constructor
and destructor of \tcode{A} shall not throw exceptions.

\pnum
Expand Down Expand Up @@ -10197,7 +10197,7 @@
\end{itemdecl}

\begin{itemdescr}
\pnum\returns If \tcode{p} \textit{owns} a deleter \tcode{d} of type cv-unqualified
\pnum\returns If \tcode{p} owns a deleter \tcode{d} of type cv-unqualified
\tcode{D}, returns \tcode{addressof(d)}; otherwise returns \tcode{nullptr}.
The returned
pointer remains valid as long as there exists a \tcode{shared_ptr} instance
Expand Down Expand Up @@ -10285,7 +10285,7 @@
\end{itemdecl}

\begin{itemdescr}
\pnum\effects Constructs an \textit{empty} \tcode{weak_ptr} object.
\pnum\effects Constructs an empty \tcode{weak_ptr} object.

\pnum\postconditions \tcode{use_count() == 0}.
\end{itemdescr}
Expand All @@ -10301,9 +10301,9 @@
\pnum\remarks The second and third constructors shall not participate in
overload resolution unless \tcode{Y*} is compatible with \tcode{T*}.

\pnum\effects If \tcode{r} is \textit{empty}, constructs
an \textit{empty} \tcode{weak_ptr} object; otherwise, constructs
a \tcode{weak_ptr} object that \textit{shares ownership}
\pnum\effects If \tcode{r} is empty, constructs
an empty \tcode{weak_ptr} object; otherwise, constructs
a \tcode{weak_ptr} object that shares ownership
with \tcode{r} and stores a copy of the pointer stored in \tcode{r}.

\pnum\postconditions \tcode{use_count() == r.use_count()}.
Expand All @@ -10322,7 +10322,7 @@
\pnum\effects Move constructs a \tcode{weak_ptr} instance from \tcode{r}.

\pnum\postconditions \tcode{*this} shall contain the old value of \tcode{r}.
\tcode{r} shall be \textit{empty}. \tcode{r.use_count() == 0}.
\tcode{r} shall be empty. \tcode{r.use_count() == 0}.
\end{itemdescr}

\rSec4[util.smartptr.weak.dest]{\tcode{weak_ptr} destructor}
Expand Down Expand Up @@ -10393,9 +10393,9 @@
\end{itemdecl}

\begin{itemdescr}
\pnum\returns \tcode{0} if \tcode{*this} is \textit{empty};
\pnum\returns \tcode{0} if \tcode{*this} is empty;
otherwise, the number of \tcode{shared_ptr} instances
that \textit{share ownership} with \tcode{*this}.
that share ownership with \tcode{*this}.
\end{itemdescr}

\indexlibrarymember{expired}{weak_ptr}%
Expand Down Expand Up @@ -10505,7 +10505,7 @@
\indexlibrary{\idxcode{enable_shared_from_this}}%
A class \tcode{T} can inherit from \tcode{enable_shared_from_this<T>}
to inherit the \tcode{shared_from_this} member functions that obtain
a \textit{shared_ptr} instance pointing to \tcode{*this}.
a \tcode{shared_ptr} instance pointing to \tcode{*this}.

\pnum
\begin{example}
Expand Down

0 comments on commit afef023

Please sign in to comment.