C++11新特性之定义类型别名

在C++98中,我们通常用typedef关键字为类型第一别名:

typedef unsigend char  u_int8;

在C++11中,为类型定义别名已不再时typedef的专属任务,using关键字也具有这一功能:

using u_int8 = unsigned char;

猜你喜欢

转载自blog.csdn.net/jxianxu/article/details/80642233