I'm trying to understand why we can't use nested type through class-member-access expression.
For instance, we have the following class:

```
struct U
{
    struct A
    {
        static int v;
        int a;
    };

    struct B
    {
       int b;
    };
};

U a;

typedef a.A T; //'a' does not name a type

int main()
{
    std::cout << typeid(a.A).hash_code(); //invalid use of 'struct U::A'
    struct a.A b;                         //trying to declare a variable of type U::A
                                          //error: expected unqualified-id before '.' token
    a.A b;                                //the same as above
                                          //error: expected unqualified-id before '.' token
    a.A.v = 5;                            //error: expected unqualified-id before '.' token
}

```

**[DEMO](http://coliru.stacked-crooked.com/a/c1e74f1e1ec6ce6e)**

The Standard says:

Section `N3797::5.2.5/2 [expr.ref]`

> 
> For the first option (dot) the first expression shall have complete
>  class type. For the second option (arrow) the first expression shall
>  have pointer to complete class type. The expression E1->E2 is
>  converted to the equivalent form (\*(E1)).E2; the remainder of 5.2.5
>  will address only the first option (dot).In either case, the
>  *id-expression shall name a member of the class or of one of its base classes*.
> 
> 
> 

Whereas, section `N3797::9.2/1 [class.mem]` gives a definition of class member:

> 
> Members of a class are data members, member functions (9.3), nested
>  types, and enumerators.
> 
> 
> 

So I can't see the restriction for such usage of nested type. Why not?