0
typedef unsigned xyz_t;

here xyz_t is user defined name.

Is 'integer' implicit in this case?

4 Answers4

5

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.

463035818_is_not_an_ai
  • 109,796
  • 11
  • 89
  • 185
2

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.

L. F.
  • 19,445
  • 8
  • 48
  • 82
1

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.

user7860670
  • 35,849
  • 4
  • 58
  • 84
0

Yes.

unsigned is the same as unsigned int.

Mithun K
  • 9
  • 4
  • Though we thank you for your answer, it would be better if it provided additional value on top of the other answers. In this case, your answer does not provide additional value, since another user already posted that solution. If a previous answer was helpful to you, you should vote it up instead of repeating the same information. – Toby Speight Sep 30 '19 at 14:11