【发布时间】:2010-09-17 09:20:37
【问题描述】:
我有这样的代码:
template <typename T, typename U> struct MyStruct {
T aType;
U anotherType;
};
class IWantToBeFriendsWithMyStruct
{
friend struct MyStruct; //what is the correct syntax here ?
};
赋予模板友谊的正确语法是什么?
【问题讨论】:
标签: c++ class templates syntax friend