Skip to content

Commit 12a2e08

Browse files
author
Dawn Perchik
committed
CWG2164 Name hiding and using-directives
1 parent ecd4bcc commit 12a2e08

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

source/basic.tex

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1141,16 +1141,18 @@
11411141
\indextext{scope name hiding and}%
11421142
\indextext{name hiding}%
11431143
\indextext{hiding|see{name hiding}}%
1144-
A name can be hidden by an explicit declaration of that same name in a
1145-
nested declarative region or derived class\iref{class.member.lookup}.
1144+
A declaration of a name in a nested declarative region
1145+
hides a declaration of the same name in an enclosing declarative region;
1146+
see \ref{basic.scope.declarative} and \ref{basic.lookup.unqual}.
11461147

11471148
\pnum
11481149
\indextext{name hiding}%
1149-
A class name\iref{class.name} or enumeration name\iref{dcl.enum} can
1150-
be hidden by the name of a variable, data member, function, or enumerator declared in
1151-
the same scope. If a class or enumeration name and a variable, data member, function,
1152-
or enumerator are declared in the same scope (in any order) with the
1153-
same name, the class or enumeration name is hidden wherever the variable, data member,
1150+
If a class name\iref{class.name} or enumeration name\iref{dcl.enum} and
1151+
a variable, data member, function, or enumerator
1152+
are declared in the same declarative region (in any order) with the
1153+
same name (excluding declarations made visible
1154+
via \grammarterm{using-directive}{s}\iref{basic.lookup.unqual}),
1155+
the class or enumeration name is hidden wherever the variable, data member,
11541156
function, or enumerator name is visible.
11551157

11561158
\pnum

0 commit comments

Comments
 (0)