【发布时间】:2013-09-18 21:36:15
【问题描述】:
using IntegerType1 = int;
typedef int IntegerType2;
int main()
{
IntegerType1 n1 = 1; // OK
IntegerType2 n2 = 2; // OK
}
我的问题是:
using-style和typedef-style有什么区别?
既然我们已经有了 typedef-style,那么让 using-style 成为 C++ 标准的动机是什么?
【问题讨论】:
-
已经有多个问题了。
标签: c++ c++11 types typedef using