Reputation: 43
typedef unsigned xyz_t;
here xyz_t is user defined name.
Is 'integer' implicit in this case?
Upvotes: 0
Views: 88
Reputation: 122830
unsigned
is the short way of writing unsigned int
. See here for a more complete list of integer types and their equivalent ways to write them.
After the typedef xyz_t
is an alias for unsigned int
.
Upvotes: 5
Reputation: 20619
Per Table 11 of N4659 (the C++17 standard final draft):
Specifier(s) Type [...] unsigned “unsigned int” unsigned int “unsigned int” [...]
Therefore, unsigned
has exactly the same meaning as unsigned int
in this case.
Upvotes: 2
Reputation: 37599
xyz_t
in this context is declared to be a type alias to unsigned int
type.
If xyz_t
is previously declared in the same scope to be some other, non basic data type, then this code will cause compile time error.
Upvotes: 1