Skip to content

Remove \xspace everywhere except for \opt #1761

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Nov 21, 2017
8 changes: 4 additions & 4 deletions source/algorithms.tex
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
\rSec1[algorithms.general]{General}

\pnum
This Clause describes components that \Cpp programs may use to perform
This Clause describes components that \Cpp{} programs may use to perform
algorithmic operations on containers\iref{containers} and other sequences.

\pnum
Expand Down Expand Up @@ -1278,7 +1278,7 @@
\rSec1[algorithms.parallel]{Parallel algorithms}

\pnum
This subclause describes components that \Cpp programs may use to perform
This subclause describes components that \Cpp{} programs may use to perform
operations on containers and other sequences in parallel.

\rSec2[algorithms.parallel.defns]{Terms and definitions}
Expand Down Expand Up @@ -4468,10 +4468,10 @@
The resulting range shall not overlap with either of the original ranges.

\pnum
\effects\ Copies all the elements of the two ranges \range{first1}{last1} and
\effects Copies all the elements of the two ranges \range{first1}{last1} and
\range{first2}{last2} into the range \range{result}{result_last}, where \tcode{result_last}
is \tcode{result + (last1 - first1) + (last2 - first2)}, such that the resulting range satisfies
\tcode{is_sorted(result, result_last)} or \tcode{is_sorted(result, result_last, comp)}, respectively.
\tcode{is_sorted(result, result_last)} or \tcode{is_sorted(re\-sult, result_last, comp)}, respectively.

\pnum
\returns
Expand Down
4 changes: 2 additions & 2 deletions source/back.tex
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ \chapter{Bibliography}

\clearpage
\input{xrefdelta}
\renewcommand{\glossaryname}{Cross references from ISO \CppXVII}
\renewcommand{\glossaryname}{Cross references from ISO \CppXVII{}}
\renewcommand{\preglossaryhook}{All clause and subclause labels from
ISO \CppXVII (ISO/IEC 14882:2017, \doccite{Programming Languages --- \Cpp})
ISO \CppXVII{} (ISO/IEC 14882:2017, \doccite{Programming Languages --- \Cpp{}})
are present in this document, with the exceptions described below.\\}
\renewcommand{\leftmark}{\glossaryname}
{
Expand Down
44 changes: 22 additions & 22 deletions source/basic.tex
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
\gramSec[gram.basic]{Basic concepts}

\pnum
\begin{note} This Clause presents the basic concepts of the \Cpp language.
\begin{note} This Clause presents the basic concepts of the \Cpp{} language.
It explains the difference between an object and a
name and how they relate to the value categories for expressions.
It introduces the concepts of a
declaration and a definition and presents \Cpp's
declaration and a definition and presents \Cpp{}'s
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just FYI: I don't think the braces are required here (unless you want to prevent kerning).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The idea is to have a general rule that all \Cpp macros are followed by {}. Whether that's necessary in a particular situation should not matter.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only downsides are the adverse impact on readability of the source and (potentially) kerning.

I doubt that kerning is much of a problem here. And giving up a little bit of readability to gain consistency (for those editors who are less familiar with TeX's parsing rules) sounds like a reasonable thing to do.

(We could also add a lint check to warn in suspicious uses of \Cpp without the terminating {}.)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change does in fact not cause any visual diff.

@godbyk: Yes, sure, that sounds useful!

notion of type, scope, linkage, and
storage duration. The mechanisms for starting and
terminating a program are discussed. Finally, this Clause presents the
Expand Down Expand Up @@ -215,7 +215,7 @@
\pnum
\begin{note}
\indextext{implementation-generated}%
In some circumstances, \Cpp implementations implicitly define the
In some circumstances, \Cpp{} implementations implicitly define the
default constructor\iref{class.ctor},
copy constructor\iref{class.copy},
move constructor\iref{class.copy},
Expand Down Expand Up @@ -2540,7 +2540,7 @@
identity does not require a diagnostic.

\pnum
\begin{note} Linkage to non-\Cpp declarations can be achieved using a
\begin{note} Linkage to non-\Cpp{} declarations can be achieved using a
\grammarterm{linkage-specification}\iref{dcl.link}. \end{note}%
\indextext{linkage|)}

Expand All @@ -2550,7 +2550,7 @@

\pnum
\indextext{memory model|(}%
The fundamental storage unit in the \Cpp memory model is the
The fundamental storage unit in the \Cpp{} memory model is the
\defn{byte}.
A byte is at least large enough to contain any member of the basic
\indextext{character set!basic execution}%
Expand All @@ -2562,7 +2562,7 @@
the number of which is \impldef{bits in a byte}. The least
significant bit is called the \defn{low-order bit}; the most
significant bit is called the \defn{high-order bit}. The memory
available to a \Cpp program consists of one or more sequences of
available to a \Cpp{} program consists of one or more sequences of
contiguous bytes. Every byte has a unique address.

\pnum
Expand Down Expand Up @@ -2614,7 +2614,7 @@

\pnum
\indextext{object model|(}%
The constructs in a \Cpp program create, destroy, refer to, access, and
The constructs in a \Cpp{} program create, destroy, refer to, access, and
manipulate objects.
An \defn{object} is created
by a definition\iref{basic.def},
Expand Down Expand Up @@ -2800,7 +2800,7 @@

\pnum
\begin{note}
\Cpp provides a variety of fundamental types and several ways of composing
\Cpp{} provides a variety of fundamental types and several ways of composing
new types from existing types\iref{basic.types}.
\end{note}%
\indextext{object model|)}
Expand Down Expand Up @@ -3181,7 +3181,7 @@
\indextext{\idxcode{new}}%
\grammarterm{new-expression}{s}\iref{expr.new}, and destroyed using
\indextext{\idxcode{delete}}%
\grammarterm{delete-expression}{s}\iref{expr.delete}. A \Cpp implementation
\grammarterm{delete-expression}{s}\iref{expr.delete}. A \Cpp{} implementation
provides access to, and management of, dynamic storage via the global
\defn{allocation functions} \tcode{operator new} and \tcode{operator
new[]} and the global \defn{deallocation functions} \tcode{operator
Expand All @@ -3194,7 +3194,7 @@
\pnum
The library provides default definitions for the global allocation and
deallocation functions. Some global allocation and deallocation
functions are replaceable\iref{new.delete}. A \Cpp program shall
functions are replaceable\iref{new.delete}. A \Cpp{} program shall
provide at most one definition of a replaceable allocation or
deallocation function. Any such function definition replaces the default
version provided in the library\iref{replacement.functions}. The
Expand Down Expand Up @@ -3240,7 +3240,7 @@
class\iref{class.free}.

\pnum
Any allocation and/or deallocation functions defined in a \Cpp program,
Any allocation and/or deallocation functions defined in a \Cpp{} program,
including the default versions in the library, shall conform to the
semantics specified in~\ref{basic.stc.dynamic.allocation}
and~\ref{basic.stc.dynamic.deallocation}.
Expand Down Expand Up @@ -3288,7 +3288,7 @@
returned as a request for zero size is undefined.\footnote{The intent is
to have \tcode{operator new()} implementable by
calling \tcode{std::malloc()} or \tcode{std::calloc()}, so the rules are
substantially the same. \Cpp differs from C in requiring a zero request
substantially the same. \Cpp{} differs from C in requiring a zero request
to return a non-null pointer.}

\pnum
Expand All @@ -3311,7 +3311,7 @@
A global allocation function is only called as the result of a new
expression\iref{expr.new}, or called directly using the function call
syntax\iref{expr.call}, or called indirectly through calls to the
functions in the \Cpp standard library. \begin{note} In particular, a
functions in the \Cpp{} standard library. \begin{note} In particular, a
global allocation function is not called to allocate storage for objects
with static storage duration\iref{basic.stc.static}, for objects or references
with thread storage duration\iref{basic.stc.thread}, for objects of
Expand Down Expand Up @@ -3394,12 +3394,12 @@
A pointer value is a \defn{safely-derived pointer} to a dynamic object only if it
has an object pointer type and it is one of the following:
\begin{itemize}
\item the value returned by a call to the \Cpp standard library implementation of
\item the value returned by a call to the \Cpp{} standard library implementation of
\tcode{::operator new(std::\brk{}size_t)} or
\tcode{::operator new(std::size_t, std::align_val_t)}%
;\footnote{This subclause does not impose restrictions
on indirection through pointers to memory not allocated by \tcode{::operator new}. This
maintains the ability of many \Cpp implementations to use binary libraries and
maintains the ability of many \Cpp{} implementations to use binary libraries and
components written in other languages. In particular, this applies to C binaries,
because indirection through pointers to memory allocated by \tcode{std::malloc} is not restricted.}

Expand Down Expand Up @@ -3636,7 +3636,7 @@
a set of bits in the object representation that determines a
\defn{value}, which is one discrete element of an
\impldef{values of a trivially copyable type} set of values.\footnote{The
intent is that the memory model of \Cpp is compatible
intent is that the memory model of \Cpp{} is compatible
with that of ISO/IEC 9899 Programming Language C.}

\pnum
Expand Down Expand Up @@ -4556,7 +4556,7 @@
If \placeholder{A} and \placeholder{B} would not otherwise be sequenced then they are
indeterminately sequenced.
\end{note}
Several contexts in \Cpp cause evaluation of a function call, even
Several contexts in \Cpp{} cause evaluation of a function call, even
though no corresponding function call syntax appears in the translation
unit.
\begin{example}
Expand Down Expand Up @@ -4596,7 +4596,7 @@
with automatic or thread storage duration\iref{basic.stc} is associated with
one specific thread, and can be accessed by a different thread only indirectly
through a pointer or reference\iref{basic.compound}.} Under a hosted
implementation, a \Cpp program can have more than one thread running
implementation, a \Cpp{} program can have more than one thread running
concurrently. The execution of each thread proceeds as defined by the remainder
of this document. The execution of the entire program consists of an execution
of all of its threads. \begin{note} Usually the execution can be viewed as an
Expand Down Expand Up @@ -4878,7 +4878,7 @@
\begin{note} The four preceding coherence requirements effectively disallow
compiler reordering of atomic operations to a single object, even if both
operations are relaxed loads. This effectively makes the cache coherence
guarantee provided by most hardware available to \Cpp atomic operations.
guarantee provided by most hardware available to \Cpp{} atomic operations.
\end{note}

\pnum
Expand Down Expand Up @@ -4942,7 +4942,7 @@

\pnum
\begin{note} Transformations that introduce a speculative read of a potentially
shared memory location may not preserve the semantics of the \Cpp program as
shared memory location may not preserve the semantics of the \Cpp{} program as
defined in this document, since they potentially introduce a data race. However,
they are typically valid in the context of an optimizing compiler that targets a
specific machine with well-defined semantics for data races. They would be
Expand Down Expand Up @@ -5174,7 +5174,7 @@

\pnum
An implementation shall not predefine the \tcode{main} function. This
function shall not be overloaded. Its type shall have \Cpp language linkage
function shall not be overloaded. Its type shall have \Cpp{} language linkage
and it shall have a declared return type of type
\tcode{int}, but otherwise its type is \impldef{parameters to \tcode{main}}.
\indextext{\idxcode{main} function!implementation-defined parameters to}%
Expand All @@ -5198,7 +5198,7 @@
\tcode{argv[0]} through \tcode{argv[argc-1]} as pointers to the initial
characters of null-terminated multibyte strings (\ntmbs{}s)\iref{multibyte.strings}
and \tcode{argv[0]} shall be the pointer to
the initial character of a \ntmbs that represents the name used to
the initial character of a \ntmbs{} that represents the name used to
invoke the program or \tcode{""}. The value of \tcode{argc} shall be
non-negative. The value of \tcode{argv[argc]} shall be 0. \begin{note} It
is recommended that any further (optional) parameters be added after
Expand Down
Loading