【发布时间】:2017-11-13 13:48:53
【问题描述】:
所以我有some code,我问了一个问题,我意识到这个问题令人困惑,后来被删掉了:
template <typename T>
struct foo {
typedef typename pair<T, T> PointType;
private:
PointType point;
};
我不确定typename 在PointType 的定义中的作用是什么。这个关键字只是省略了吗?我注意到它经常在using 定义中用于在类型支持中添加*_t 扩展。也许这就是这里的意图?
【问题讨论】:
标签: c++ templates metaprogramming typedef typename