The short (slightly over-simplified) answer is, "it will fail for anything other than a simple-type-specifier".
5.2.3/1 says:
A simple-type-specifier (7.1.6.2) or typename-specifier (14.6) followed
by a parenthesized expression-list constructs a value of the specified
type given the expression list.
A simple-type-specifier can be either a one-word name for a type (optionally plus some ::
stuff for the scope, and/or template arguments which themselves need not be simple type specifiers) or a decltype
expression. The possibilities are listed in 7.1.6.2.
unsigned int
and int*
aren't simple-type-specifiers. Any compound type specifier will fail, so cv-qualification, array types, function types, pointer types including pointer-to-function and pointer-to-member would all need a typedef.
Also ruled out are the multi-word type identifiers like unsigned char
, long double
. For your first example, unsigned
would work in place of unsigned int
.
A typename-specifier is a type preceded by typename
, used in templates to assert that a dependent name is indeed a type, not a data member or member function.
Finally of course, once you get past this restriction the type has to actually be constructible or convertible from the expression-list. So for example you can't create a temporary of function type using this or any other syntax.