Skip to content

Commit

Permalink
Use link macros more.
Browse files Browse the repository at this point in the history
  • Loading branch information
Eelis committed Apr 15, 2018
1 parent d6234b6 commit 4253513
Show file tree
Hide file tree
Showing 17 changed files with 439 additions and 391 deletions.
44 changes: 22 additions & 22 deletions source/basic.tex
Expand Up @@ -2495,9 +2495,9 @@
\indextext{memory model|(}%
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
A byte is at least large enough to contain any member of the
\indextext{character set!basic execution}%
execution character set\iref{lex.charset}
\deflinkx{basic execution character set}{character set!basic execution}{\ref{lex.charset}}
and the eight-bit code units of the Unicode UTF-8 encoding form
and is composed of a contiguous sequence of
bits,\footnote{The number of bits in a byte is reported by the macro
Expand All @@ -2517,8 +2517,8 @@
sequence of adjacent bit-fields all having nonzero width. \begin{note} Various
features of the language, such as references and virtual functions, might
involve additional memory locations that are not accessible to programs but are
managed by the implementation. \end{note} Two or more threads of
execution\iref{intro.multithread} can access separate memory
managed by the implementation. \end{note} Two or more \deflinkx{threads of
execution}{thread of execution}{\ref{intro.multithread}} can access separate memory
locations without interfering with each other.

\pnum
Expand Down Expand Up @@ -3459,7 +3459,7 @@
integer value representing the number of bytes between successive addresses
at which a given object can be allocated. An object type imposes an alignment
requirement on every object of that type; stricter alignment can be requested
using the alignment specifier\iref{dcl.align}.
using the \link{alignment specifier}{\ref{dcl.align}}.

\pnum
\indextext{alignment!fundamental}%
Expand Down Expand Up @@ -3513,8 +3513,8 @@

\pnum
The alignment requirement of a complete type can be queried using an
\tcode{alignof} expression\iref{expr.alignof}. Furthermore,
the narrow character types\iref{basic.fundamental} shall have the weakest
\link{\tcode{alignof} expression}{\ref{expr.alignof}}. Furthermore,
the \deflinkx{narrow character types}{type!narrow character}{\ref{basic.fundamental}} shall have the weakest
alignment requirement.
\begin{note} This enables the narrow character types to be used as the
underlying type for an aligned memory area\iref{dcl.align}.\end{note}
Expand Down Expand Up @@ -3897,7 +3897,7 @@
neither \tcode{true} nor \tcode{false}.}
\begin{note} There are no \tcode{signed}, \tcode{unsigned}, \tcode{short},
or \tcode{long bool} types or values. \end{note} Values of type
\tcode{bool} participate in integral promotions\iref{conv.prom}.
\tcode{bool} participate in \deflink{integral promotions}{\ref{conv.prom}}.

\pnum
Types \tcode{bool}, \tcode{char}, \tcode{char16_t}, \tcode{char32_t},
Expand Down Expand Up @@ -3958,17 +3958,17 @@
type for functions that do not return a value. Any expression can be
explicitly converted to type \cv{}~\tcode{void}\iref{expr.cast}.
An expression of type \cv{}~\tcode{void} shall
be used only as an expression statement\iref{stmt.expr}, as an operand
of a comma expression\iref{expr.comma}, as a second or third operand
be used only as an \link{expression statement}{\ref{stmt.expr}}, as an operand
of a \link{comma expression}{\ref{expr.comma}}, as a second or third operand
of \tcode{?:}\iref{expr.cond}, as the operand of
\tcode{typeid}, \tcode{noexcept}, or \tcode{decltype}, as
the expression in a \tcode{return} statement\iref{stmt.return} for a function
the expression in a \link{\tcode{return} statement}{\ref{stmt.return}} for a function
with the return type \cv{}~\tcode{void}, or as the operand of an explicit conversion
to type \cv{}~\tcode{void}.

\pnum
A value of type \tcode{std::nullptr_t} is a null pointer
constant\iref{conv.ptr}. Such values participate in the pointer and the
A value of type \tcode{std::nullptr_t} is a \deflink{null pointer
constant}{\ref{conv.ptr}}. Such values participate in the pointer and the
pointer-to-member conversions~(\ref{conv.ptr}, \ref{conv.mem}).
\tcode{sizeof(std::nullptr_t)} shall be equal to \tcode{sizeof(void*)}.

Expand Down Expand Up @@ -4094,7 +4094,7 @@
layout-compatible types shall
have the same value representation and alignment
requirements\iref{basic.align}.
\begin{note} Pointers to over-aligned types\iref{basic.align} have no special
\begin{note} Pointers to \deflinkx{over-aligned types}{type!over-aligned}{\ref{basic.align}} have no special
representation, but their range of valid values is restricted by the extended
alignment requirement.\end{note}

Expand All @@ -4120,7 +4120,7 @@
then they have the same address,
and it is possible to obtain a pointer to one
from a pointer to the other
via a \tcode{reinterpret_cast}\iref{expr.reinterpret.cast}.
via a \link{\tcode{reinterpret_cast}}{\ref{expr.reinterpret.cast}}.
\begin{note}
An array object and its first element are not pointer-interconvertible,
even though they have the same address.
Expand Down Expand Up @@ -4295,18 +4295,18 @@
\end{itemize}

\begin{note}
The integer conversion rank is used in the definition of the integral
promotions\iref{conv.prom} and the usual arithmetic
conversions\iref{expr.prop}.
The integer conversion rank is used in the definition of the \deflink{integral
promotions}{\ref{conv.prom}} and the usual arithmetic
conversions\iref{expr.prop}. % todo: badref?
\end{note}%

\rSec1[basic.exec]{Program execution}

\rSec2[intro.execution]{Sequential execution}

\pnum
An instance of each object with automatic storage
duration\iref{basic.stc.auto} is associated with each entry into its
An instance of each object with \link{automatic storage
duration}{\ref{basic.stc.auto}} is associated with each entry into its
block. Such an object exists and retains its last-stored value during
the execution of the block and while the block is suspended (by a call
of a function or receipt of a signal).
Expand Down Expand Up @@ -4347,7 +4347,7 @@
the initialization of the entities captured by copy and
the constituent expressions of the \grammarterm{initializer} of the \grammarterm{init-capture}{s},
\item
if \tcode{e} is a function call\iref{expr.call} or implicitly invokes a function,
if \tcode{e} is a \link{function call}{\ref{expr.call}} or implicitly invokes a function,
the constituent expressions of each default argument\iref{dcl.fct.default}
used in the call, or
\item
Expand All @@ -4369,7 +4369,7 @@
A \defn{full-expression} is
\begin{itemize}
\item
an unevaluated operand\iref{expr.prop},
an \deflink{unevaluated operand}{\ref{expr.prop}},
\item
a \grammarterm{constant-expression}\iref{expr.const},
\item
Expand Down
2 changes: 1 addition & 1 deletion source/classes.tex
Expand Up @@ -542,7 +542,7 @@
(a \defn{non-static data member} or
\defn{non-static member function}~(\ref{class.mfct.non-static}), respectively).
\begin{note} A non-static data member of non-reference
type is a member subobject of a class object\iref{intro.object}.\end{note}
type is a \deflink{member subobject}{\ref{intro.object}} of a class object.\end{note}

\pnum
A member shall not be declared twice in the
Expand Down
4 changes: 2 additions & 2 deletions source/conversions.tex
Expand Up @@ -356,7 +356,7 @@
\pnum
\indextext{type!underlying!enumeration}%
A prvalue of an unscoped enumeration type whose underlying type is not
fixed\iref{dcl.enum} can be converted to a prvalue of the first of the following
\deflinkx{fixed}{type!underlying!fixed}{\ref{dcl.enum}} can be converted to a prvalue of the first of the following
types that can represent all the values of the enumeration (i.e., the values in the
range $b_\text{min}$ to $b_\text{max}$ as described in~\ref{dcl.enum}): \tcode{int},
\tcode{unsigned int}, \tcode{long int}, \tcode{unsigned long int},
Expand All @@ -369,7 +369,7 @@

\pnum
A prvalue of an unscoped enumeration type whose underlying type is
fixed\iref{dcl.enum} can be converted to a prvalue of its underlying type. Moreover,
\deflinkx{fixed}{type!underlying!fixed}{\ref{dcl.enum}} can be converted to a prvalue of its underlying type. Moreover,
if integral promotion can be applied to its underlying type, a prvalue of an unscoped
enumeration type whose underlying type is fixed can also be converted to a prvalue of
the promoted underlying type.
Expand Down
14 changes: 7 additions & 7 deletions source/declarations.tex
Expand Up @@ -1849,7 +1849,7 @@
of a \grammarterm{new-expression}\iref{expr.new},
or
as the \grammarterm{simple-type-specifier}
in an explicit type conversion (functional notation)\iref{expr.type.conv}.
in an \link{explicit type conversion (functional notation)}{\ref{expr.type.conv}}.
A placeholder for a deduced class type
shall not appear in any other context.

Expand Down Expand Up @@ -2273,7 +2273,7 @@
\pnum
In a \grammarterm{named-namespace-definition},
the \grammarterm{identifier} is the name of the namespace.
If the \grammarterm{identifier}, when looked up\iref{basic.lookup.unqual},
If the \grammarterm{identifier}, when \link{looked up}{\ref{basic.lookup.unqual}},
refers to a \grammarterm{namespace-name} (but not a \grammarterm{namespace-alias})
that was introduced in the namespace
in which the \grammarterm{named-namespace-definition} appears
Expand Down Expand Up @@ -2499,8 +2499,8 @@
class, function, class template or function template\footnote{this implies that the name of the class or function is unqualified.}
the friend is a member of the innermost enclosing
namespace. The friend declaration does not by itself make the name
visible to unqualified lookup\iref{basic.lookup.unqual} or qualified
lookup\iref{basic.lookup.qual}. \begin{note} The name of the friend will be
visible to \link{unqualified lookup}{\ref{basic.lookup.unqual}} or \link{qualified
lookup}{\ref{basic.lookup.qual}}. \begin{note} The name of the friend will be
visible in its namespace if a matching declaration is provided at namespace
scope (either before or after the class definition granting friendship).
\end{note} If a friend
Expand Down Expand Up @@ -3740,7 +3740,7 @@
\grammarterm{class-head}\iref{class}, respectively) and to the
declaration or definition of an enumeration (in an
\grammarterm{opaque-enum-declaration} or \grammarterm{enum-head},
respectively\iref{dcl.enum}).
respectively).
An \grammarterm{alignment-specifier} with an ellipsis is a \deflink{pack expansion}{\ref{temp.variadic}}.

\pnum
Expand All @@ -3758,7 +3758,7 @@
\pnum
An \grammarterm{alignment-specifier} of the form
\tcode{alignas(} \grammarterm{type-id} \tcode{)} has the same
effect as \tcode{alignas(\brk{}alignof(} \grammarterm{type-id}~\tcode{))}\iref{expr.alignof}.
effect as \tcode{alignas(\brk{}\link{alignof}{expr.alignof}(} \grammarterm{type-id}~\tcode{))}.

\pnum
The alignment requirement of an entity is the strictest nonzero alignment
Expand Down Expand Up @@ -4114,7 +4114,7 @@
calls a function previously declared \tcode{nodiscard}, or
whose return type is a possibly cv-qualified class or enumeration type
marked \tcode{nodiscard}. Appearance of a nodiscard call as
a potentially-evaluated discarded-value expression\iref{expr.prop}
a potentially-evaluated \deflink{discarded-value expression}{\ref{expr.prop}}
is discouraged unless explicitly cast to \tcode{void}.
Implementations should issue a warning in such cases.
This is typically because discarding the return value
Expand Down
2 changes: 1 addition & 1 deletion source/declarators.tex
Expand Up @@ -3041,7 +3041,7 @@
is initialized as follows:
\begin{itemize}
\item
If the element has a default member initializer\iref{class.mem},
If the element has a \deflink{default member initializer}{\ref{class.mem}},
the element is initialized from that initializer.
\item
Otherwise, if the element is not a reference, the element
Expand Down

0 comments on commit 4253513

Please sign in to comment.