11
Classes
[class]
11.4
Class members
[class.mem]
11.4.12
Nested type names
[class.nested.type]
1
#
Type names obey exactly the same scope rules as other names
.
In particular, type names defined within a class definition cannot be used outside their class without qualification
.
[
Example
1
:
struct
X
{
typedef
int
I;
class
Y
{
/* ... */
}
; I a;
}
; I b;
// error
Y c;
// error
X
::
Y d;
// OK
X
::
I e;
// OK
—
end example
]