So this question might be a little odd, but why is the following illegal in C++?
auto x = unsigned int(0);
auto y = int(0);
auto z = unsigned(0);
auto w = float(0);
auto t = Type(... c-tor-args ...);
This is explicit type conversion, and functional cast expression consists of a single-word type specifier is not valid.
The functional cast expression consists of a simple type specifier or a typedef specifier (in other words, a single-word type name:
int*(expression)are not valid), followed by a single expression in parentheses. This cast expression is exactly equivalent to the corresponding C-style cast expression.
You can change it to c-style cast expression or
auto x1 = (unsigned int)(0); auto x2 = static_cast<unsigned int>(0);