typedefdeclarations use the same syntax as regular variable declarations. The difference is that instead of declaring "a variable with a xtype name , y" you declare a "type with a name xthat is synonymous with the type y." The syntax is otherwise the same.
, typedef , :
int var[1];
var - , int[1], int. typedef :
typedef int var[1];
var int[1].
:
int (*fp)(int);
typedef int (*fp)(int);
, identity,
template <typename T> struct identity { typedef T type; };
, . , :
typedef identity<int[1] >::type var;
typedef identity<int(*)(int)>::type fp;
, , , , identity:
identity<int[1] >::type var;
identity<int(*)(int)>::type fp;