I've gotten an error message from this snippet:
void f() {
unsigned int x = unsigned int (5);
}
N2857, 5.2.3 Explicit type conversion (functional notation),
seems to imply that this is valid code, but perhaps I am
misreading it.
You're misreading it, but I don't really see how. The grammar
doesn't have any construct which will parse the above, so it
isn't legal. The syntax of an explicit type conversion
(functional notation) is:
simple-type-specifier ( expression-list[opt] )
typename-specifier ( expression-list[opt] )
A simple-type-specifier is either a single keyword which names a
type (e.g. int or unsigned), a class, enum or typedef name, or a
name declared by a typedef. A typename-specifier is something
along the lines of "typename ...", where the ... must be a
qualified id.
Compare this with explicit type conversion (cast notation),
where the syntax is:
( type-id ) cast-expression
This allows an arbitrarily complicated type specifier (e.g.
unsigned int, char const*, int (C::* (*)())(), etc.---not that
I'd recommend things like that last one in production code).