【发布时间】:2017-07-23 21:20:24
【问题描述】:
这是我的代码 sn-p
template <class T>
struct ClassFriendMaker
{
typedef T Type;
};
template <class T>
class Singleton
{
friend class ClassFriendMaker<T>::Type; // Problem in this line
//Other declaration
}
当用 CLANG 编译时,它给了我一个错误:
error: elaborated type refers to a typedef
friend class ClassFriendMaker<T>::Type;
^
我可以知道什么是错的吗?谢谢你
【问题讨论】:
标签: clang