Skip to content

[everywhere] Rework how we mark up inline references. #1690

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

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 24 additions & 24 deletions source/access.tex
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@
\begin{note}
Access control applies to names nominated by
\tcode{friend}
declarations~(\ref{class.friend}) and
\grammarterm{using-declaration}{s}~(\ref{namespace.udecl}).
declarations\iref{class.friend} and
\grammarterm{using-declaration}{s}\iref{namespace.udecl}.
\end{note}
In the case of overloaded function names, access control is applied to
the function selected by overload resolution.
Expand Down Expand Up @@ -109,7 +109,7 @@
the construct is ill-formed.

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

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

\begin{ncbnftab}
access-specifier \terminal{:} member-specification\opt
Expand Down Expand Up @@ -286,7 +286,7 @@
\indextext{base class!\idxcode{public}}

\pnum
If a class is declared to be a base class (Clause~\ref{class.derived}) for another class using the
If a class is declared to be a base class\iref{class.derived} for another class using the
\tcode{public}
access specifier, the
\tcode{public}
Expand Down Expand Up @@ -314,7 +314,7 @@
\tcode{protected}
members of the base class are accessible as
\tcode{private}
members of the derived class\footnote{As specified previously in Clause~\ref{class.access},
members of the derived class\footnote{As specified previously in \ref{class.access},
private members of a base class remain inaccessible even to derived classes
unless
\tcode{friend}
Expand Down Expand Up @@ -369,7 +369,7 @@
\begin{note}
A member of a private base class might be inaccessible as an inherited
member name, but accessible directly.
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
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
to an inaccessible base class might be ill-formed if an implicit conversion
is used, but well-formed if an explicit cast is used.
For example,
Expand Down Expand Up @@ -491,7 +491,7 @@
\begin{note}
This class can be explicit, e.g., when a
\grammarterm{qualified-id}
is used, or implicit, e.g., when a class member access operator~(\ref{expr.ref}) is used (including cases where an implicit
is used, or implicit, e.g., when a class member access operator\iref{expr.ref} is used (including cases where an implicit
``\tcode{this->}''
is
added).
Expand Down Expand Up @@ -684,7 +684,7 @@

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

\pnum
\indextext{declaration!overloaded name and \tcode{friend}}%
Expand Down Expand Up @@ -744,7 +744,7 @@
\pnum
\indextext{friend function!inline}%
A function can be defined in a friend declaration of a class if and only if the
class is a non-local class~(\ref{class.local}), the function name is unqualified,
class is a non-local class\iref{class.local}, the function name is unqualified,
and the function has namespace scope.
\begin{example}

Expand All @@ -757,11 +757,11 @@
\end{example}

\pnum
Such a function is implicitly an inline function~(\ref{dcl.inline}).
Such a function is implicitly an inline function\iref{dcl.inline}.
A
\tcode{friend}
function defined in a class is in the (lexical) scope of the class in which it is defined.
A friend function defined outside the class is not~(\ref{basic.lookup.unqual}).
A friend function defined outside the class is not\iref{basic.lookup.unqual}.

\pnum
No
Expand All @@ -779,7 +779,7 @@
\tcode{private},
\tcode{protected}
or
\tcode{public}~(\ref{class.mem})
\tcode{public}\iref{class.mem}
portion of the class
\grammarterm{member-specification}.

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

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

Expand Down Expand Up @@ -916,7 +916,7 @@
\indextext{access control!virtual function}

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

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

Expand Down
Loading