可能重複:
Where and why do I have to put the 「template」 and 「typename」 keywords?C++的typedef簽名
我一直在尋找通過this boost::multi_array example,它有一個typedef
如:
template <typename Array>
...
typedef typename Array::template subarray<2>::type::iterator iterator2;
我明白什麼
typedef typename <type> <new_type>;
簽名看起來像,但這有typedef typename
之後的三件事情,我無法在網上找到將被稱爲或它做了什麼。有人可以分解typedef的作用,爲什麼它有三件事?我不認爲這是特定的刺激。