摘要:
error: using typedef-name `T' after `class'templateclass Factory{ friend class T;};class Foo{};int main(){ Factory f; return 0;}按照 http://stackoverflow.com/questions/6321191/using-friend-in-templates提供的解决方案是:使用间接方式:templateclass MakeFriend{public: typedef T Type; };templateclass Factory{... 阅读全文