Skip to content

Commit beb8815

Browse files
committed
[everywhere] Rework how we mark up inline references.
Visual changes: * The "Clause" and "Annex" in "Clause N" and "Annex N" are now part of the hyperlink. * Fewer words are hyphenated (we prefer to move an inline reference across a line break rather than hyphenating a word) * Some spurious "Clause"s and "Annex"es are gone and some missing ones are now present. LaTeX-level changes: Instead of "some text~(\ref{blah})", we now use "some text\iref{blah}". Instead of "Clause~\ref{blah}", we now use simply "\ref{blah}", and the "Clause" prefix is automatically added (likewise for "Annex"). For multi-reference parentheticals, use "some text (\ref{a}, \ref{b})". A longer orphaned parenthetical is not really a big deal. ~s should now generally not be used near \ref's.
1 parent 19c6314 commit beb8815

38 files changed

+7121
-3324
lines changed

source/access.tex

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@
6969
\begin{note}
7070
Access control applies to names nominated by
7171
\tcode{friend}
72-
declarations~(\ref{class.friend}) and
73-
\grammarterm{using-declaration}{s}~(\ref{namespace.udecl}).
72+
declarations\iref{class.friend} and
73+
\grammarterm{using-declaration}{s}\iref{namespace.udecl}.
7474
\end{note}
7575
In the case of overloaded function names, access control is applied to
7676
the function selected by overload resolution.
@@ -109,7 +109,7 @@
109109
the construct is ill-formed.
110110

111111
\pnum
112-
All access controls in Clause~\ref{class.access} affect the ability to access a class member
112+
All access controls in \ref{class.access} affect the ability to access a class member
113113
name from the declaration of a particular
114114
entity, including parts of the declaration preceding the name of the entity
115115
being declared and, if the entity is a class, the definitions of members of
@@ -167,14 +167,14 @@
167167
\pnum
168168
\indextext{argument!access checking and default}%
169169
\indextext{access control!default argument}%
170-
The names in a default argument~(\ref{dcl.fct.default}) are
170+
The names in a default argument\iref{dcl.fct.default} are
171171
bound at the point of declaration, and access is checked at that
172172
point rather than at any points of use of the default argument.
173173
Access checking for default arguments in function templates and in
174174
member functions of class templates is performed as described in~\ref{temp.inst}.
175175

176176
\pnum
177-
The names in a default \grammarterm{template-argument}~(\ref{temp.param})
177+
The names in a default \grammarterm{template-argument}\iref{temp.param}
178178
have their access checked in the context in which they appear rather than at any
179179
points of use of the default \grammarterm{template-argument}. \begin{example}
180180
\begin{codeblock}
@@ -197,7 +197,7 @@
197197
\pnum
198198
Member declarations can be labeled by an
199199
\grammarterm{access-specifier}
200-
(Clause~\ref{class.derived}):
200+
(\ref{class.derived}):
201201

202202
\begin{ncbnftab}
203203
access-specifier \terminal{:} member-specification\opt
@@ -286,7 +286,7 @@
286286
\indextext{base class!\idxcode{public}}
287287

288288
\pnum
289-
If a class is declared to be a base class (Clause~\ref{class.derived}) for another class using the
289+
If a class is declared to be a base class\iref{class.derived} for another class using the
290290
\tcode{public}
291291
access specifier, the
292292
\tcode{public}
@@ -314,7 +314,7 @@
314314
\tcode{protected}
315315
members of the base class are accessible as
316316
\tcode{private}
317-
members of the derived class\footnote{As specified previously in Clause~\ref{class.access},
317+
members of the derived class\footnote{As specified previously in \ref{class.access},
318318
private members of a base class remain inaccessible even to derived classes
319319
unless
320320
\tcode{friend}
@@ -369,7 +369,7 @@
369369
\begin{note}
370370
A member of a private base class might be inaccessible as an inherited
371371
member name, but accessible directly.
372-
Because of the rules on pointer conversions~(\ref{conv.ptr}) and explicit casts~(\ref{expr.cast}), a conversion from a pointer to a derived class to a pointer
372+
Because of the rules on pointer conversions\iref{conv.ptr} and explicit casts\iref{expr.cast}, a conversion from a pointer to a derived class to a pointer
373373
to an inaccessible base class might be ill-formed if an implicit conversion
374374
is used, but well-formed if an explicit cast is used.
375375
For example,
@@ -491,7 +491,7 @@
491491
\begin{note}
492492
This class can be explicit, e.g., when a
493493
\grammarterm{qualified-id}
494-
is used, or implicit, e.g., when a class member access operator~(\ref{expr.ref}) is used (including cases where an implicit
494+
is used, or implicit, e.g., when a class member access operator\iref{expr.ref} is used (including cases where an implicit
495495
``\tcode{this->}''
496496
is
497497
added).
@@ -684,7 +684,7 @@
684684

685685
\begin{note} A \tcode{friend} declaration may be the
686686
\term{declaration} in a \grammarterm{template-declaration}
687-
(Clause~\ref{temp}, \ref{temp.friend}).\end{note} If the
687+
(\ref{temp}, \ref{temp.friend}).\end{note} If the
688688
type specifier in a \tcode{friend} declaration designates a (possibly
689689
cv-qualified) class type, that class is declared as a friend; otherwise, the
690690
\tcode{friend} declaration is ignored. \begin{example}
@@ -715,8 +715,8 @@
715715
\pnum
716716
\indextext{friend function!linkage of}%
717717
A function first declared in a friend declaration
718-
has the linkage of the namespace of which it is a member~(\ref{basic.link}).
719-
Otherwise, the function retains its previous linkage~(\ref{dcl.stc}).
718+
has the linkage of the namespace of which it is a member\iref{basic.link}.
719+
Otherwise, the function retains its previous linkage\iref{dcl.stc}.
720720

721721
\pnum
722722
\indextext{declaration!overloaded name and \tcode{friend}}%
@@ -744,7 +744,7 @@
744744
\pnum
745745
\indextext{friend function!inline}%
746746
A function can be defined in a friend declaration of a class if and only if the
747-
class is a non-local class~(\ref{class.local}), the function name is unqualified,
747+
class is a non-local class\iref{class.local}, the function name is unqualified,
748748
and the function has namespace scope.
749749
\begin{example}
750750

@@ -757,11 +757,11 @@
757757
\end{example}
758758

759759
\pnum
760-
Such a function is implicitly an inline function~(\ref{dcl.inline}).
760+
Such a function is implicitly an inline function\iref{dcl.inline}.
761761
A
762762
\tcode{friend}
763763
function defined in a class is in the (lexical) scope of the class in which it is defined.
764-
A friend function defined outside the class is not~(\ref{basic.lookup.unqual}).
764+
A friend function defined outside the class is not\iref{basic.lookup.unqual}.
765765

766766
\pnum
767767
No
@@ -779,7 +779,7 @@
779779
\tcode{private},
780780
\tcode{protected}
781781
or
782-
\tcode{public}~(\ref{class.mem})
782+
\tcode{public}\iref{class.mem}
783783
portion of the class
784784
\grammarterm{member-specification}.
785785

@@ -815,7 +815,7 @@
815815
\pnum
816816
\indextext{local class!friend}%
817817
\indextext{friend!local class and}%
818-
If a friend declaration appears in a local class~(\ref{class.local}) and the
818+
If a friend declaration appears in a local class\iref{class.local} and the
819819
name specified is an unqualified name, a prior declaration is looked
820820
up without considering scopes that are outside the innermost enclosing
821821
non-class scope.
@@ -853,17 +853,17 @@
853853
\indextext{access control!\idxcode{protected}}%
854854

855855
\pnum
856-
An additional access check beyond those described earlier in Clause~\ref{class.access}
856+
An additional access check beyond those described earlier in \ref{class.access}
857857
is applied when a non-static data member or non-static member function is a
858-
protected member of its naming class~(\ref{class.access.base}).\footnote{This
858+
protected member of its naming class\iref{class.access.base}.\footnote{This
859859
additional check does not apply to other members,
860860
e.g., static data members or enumerator member constants.}
861861
As described earlier, access to a protected member is granted because the
862862
reference occurs in a friend or member of some class \tcode{C}. If the access is
863-
to form a pointer to member~(\ref{expr.unary.op}), the
863+
to form a pointer to member\iref{expr.unary.op}, the
864864
\grammarterm{nested-name-specifier} shall denote \tcode{C} or a class derived from
865865
\tcode{C}. All other accesses involve a (possibly implicit) object
866-
expression~(\ref{expr.ref}). In this case, the class of the object expression shall be
866+
expression\iref{expr.ref}. In this case, the class of the object expression shall be
867867
\tcode{C} or a class derived from \tcode{C}.
868868
\begin{example}
869869

@@ -916,7 +916,7 @@
916916
\indextext{access control!virtual function}
917917

918918
\pnum
919-
The access rules (Clause~\ref{class.access}) for a virtual function are determined by its declaration
919+
The access rules\iref{class.access} for a virtual function are determined by its declaration
920920
and are not affected by the rules for a function that later overrides it.
921921
\begin{example}
922922

@@ -984,7 +984,7 @@
984984
\pnum
985985
A nested class is a member and as such has the same access rights as any other member.
986986
The members of an enclosing class have no special access to members of a nested
987-
class; the usual access rules (Clause~\ref{class.access}) shall be obeyed.
987+
class; the usual access rules\iref{class.access} shall be obeyed.
988988
\begin{example}
989989
\indextext{example!nested class definition}%
990990

0 commit comments

Comments
 (0)