0
這裏是我的代碼片斷CLANG:闡述類型是指一個typedef錯誤
template <class T>
struct ClassFriendMaker
{
typedef T Type;
};
template <class T>
class Singleton
{
friend class ClassFriendMaker<T>::Type; // Problem in this line
//Other declaration
}
當鏗鏘編譯,它給了我一個錯誤:
error: elaborated type refers to a typedef
friend class ClassFriendMaker<T>::Type;
^
我想知道什麼是錯的?三江源