C++ 使用别名作为"类型名称"?



我正在使用模板,编写"typename";多次。可以给它分配一个别名吗?我知道下面的方法不起作用,还有其他方法吗?

typedef typename tn;

您可以使用MACRO

#define tn typename

最新更新