Non-class-name C++11 type-name that is a simple-template-id?

c++, c++11, templates

Solution

It is possible, for example:

template <typename T> using Ptr = T *;

Ptr<int> p = 0;

Problem

In the C++11 standard it describes `type-name` and `class-name` with the following grammars: ``` type-name: class-name enum-name typedef-name simple-template-id <--- HERE class-name: identifier simple-template-id ``` My question is about the `simple-template-id` that is the direct descendant of `type-name`. Is it ever possible to have a `simple-template-id` that is a `type-name` but is not a `class-name`? For example if `foo<bar>` names a type, can it ever be a non-class type? (If the answer is no, is there some other reason I'm missing why `simple-template-id` is repeated under `type-name`?)

Original source