|
69 | 69 | \begin{note}
|
70 | 70 | Access control applies to names nominated by
|
71 | 71 | \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}. |
74 | 74 | \end{note}
|
75 | 75 | In the case of overloaded function names, access control is applied to
|
76 | 76 | the function selected by overload resolution.
|
|
109 | 109 | the construct is ill-formed.
|
110 | 110 |
|
111 | 111 | \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 |
113 | 113 | name from the declaration of a particular
|
114 | 114 | entity, including parts of the declaration preceding the name of the entity
|
115 | 115 | being declared and, if the entity is a class, the definitions of members of
|
|
167 | 167 | \pnum
|
168 | 168 | \indextext{argument!access checking and default}%
|
169 | 169 | \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 |
171 | 171 | bound at the point of declaration, and access is checked at that
|
172 | 172 | point rather than at any points of use of the default argument.
|
173 | 173 | Access checking for default arguments in function templates and in
|
174 | 174 | member functions of class templates is performed as described in~\ref{temp.inst}.
|
175 | 175 |
|
176 | 176 | \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} |
178 | 178 | have their access checked in the context in which they appear rather than at any
|
179 | 179 | points of use of the default \grammarterm{template-argument}. \begin{example}
|
180 | 180 | \begin{codeblock}
|
|
197 | 197 | \pnum
|
198 | 198 | Member declarations can be labeled by an
|
199 | 199 | \grammarterm{access-specifier}
|
200 |
| -(Clause~\ref{class.derived}): |
| 200 | +(\ref{class.derived}): |
201 | 201 |
|
202 | 202 | \begin{ncbnftab}
|
203 | 203 | access-specifier \terminal{:} member-specification\opt
|
|
286 | 286 | \indextext{base class!\idxcode{public}}
|
287 | 287 |
|
288 | 288 | \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 |
290 | 290 | \tcode{public}
|
291 | 291 | access specifier, the
|
292 | 292 | \tcode{public}
|
|
314 | 314 | \tcode{protected}
|
315 | 315 | members of the base class are accessible as
|
316 | 316 | \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}, |
318 | 318 | private members of a base class remain inaccessible even to derived classes
|
319 | 319 | unless
|
320 | 320 | \tcode{friend}
|
|
369 | 369 | \begin{note}
|
370 | 370 | A member of a private base class might be inaccessible as an inherited
|
371 | 371 | 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 |
373 | 373 | to an inaccessible base class might be ill-formed if an implicit conversion
|
374 | 374 | is used, but well-formed if an explicit cast is used.
|
375 | 375 | For example,
|
|
491 | 491 | \begin{note}
|
492 | 492 | This class can be explicit, e.g., when a
|
493 | 493 | \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 |
495 | 495 | ``\tcode{this->}''
|
496 | 496 | is
|
497 | 497 | added).
|
|
684 | 684 |
|
685 | 685 | \begin{note} A \tcode{friend} declaration may be the
|
686 | 686 | \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 |
688 | 688 | type specifier in a \tcode{friend} declaration designates a (possibly
|
689 | 689 | cv-qualified) class type, that class is declared as a friend; otherwise, the
|
690 | 690 | \tcode{friend} declaration is ignored. \begin{example}
|
|
715 | 715 | \pnum
|
716 | 716 | \indextext{friend function!linkage of}%
|
717 | 717 | 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}. |
720 | 720 |
|
721 | 721 | \pnum
|
722 | 722 | \indextext{declaration!overloaded name and \tcode{friend}}%
|
|
744 | 744 | \pnum
|
745 | 745 | \indextext{friend function!inline}%
|
746 | 746 | 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, |
748 | 748 | and the function has namespace scope.
|
749 | 749 | \begin{example}
|
750 | 750 |
|
|
757 | 757 | \end{example}
|
758 | 758 |
|
759 | 759 | \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}. |
761 | 761 | A
|
762 | 762 | \tcode{friend}
|
763 | 763 | 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}. |
765 | 765 |
|
766 | 766 | \pnum
|
767 | 767 | No
|
|
779 | 779 | \tcode{private},
|
780 | 780 | \tcode{protected}
|
781 | 781 | or
|
782 |
| -\tcode{public}~(\ref{class.mem}) |
| 782 | +\tcode{public}\iref{class.mem} |
783 | 783 | portion of the class
|
784 | 784 | \grammarterm{member-specification}.
|
785 | 785 |
|
|
815 | 815 | \pnum
|
816 | 816 | \indextext{local class!friend}%
|
817 | 817 | \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 |
819 | 819 | name specified is an unqualified name, a prior declaration is looked
|
820 | 820 | up without considering scopes that are outside the innermost enclosing
|
821 | 821 | non-class scope.
|
|
853 | 853 | \indextext{access control!\idxcode{protected}}%
|
854 | 854 |
|
855 | 855 | \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} |
857 | 857 | 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 |
859 | 859 | additional check does not apply to other members,
|
860 | 860 | e.g., static data members or enumerator member constants.}
|
861 | 861 | As described earlier, access to a protected member is granted because the
|
862 | 862 | 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 |
864 | 864 | \grammarterm{nested-name-specifier} shall denote \tcode{C} or a class derived from
|
865 | 865 | \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 |
867 | 867 | \tcode{C} or a class derived from \tcode{C}.
|
868 | 868 | \begin{example}
|
869 | 869 |
|
|
916 | 916 | \indextext{access control!virtual function}
|
917 | 917 |
|
918 | 918 | \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 |
920 | 920 | and are not affected by the rules for a function that later overrides it.
|
921 | 921 | \begin{example}
|
922 | 922 |
|
|
984 | 984 | \pnum
|
985 | 985 | A nested class is a member and as such has the same access rights as any other member.
|
986 | 986 | 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. |
988 | 988 | \begin{example}
|
989 | 989 | \indextext{example!nested class definition}%
|
990 | 990 |
|
|
0 commit comments