Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
基本上我有一个基类“base”和一个派生类“派生”,它是一个模板。
class base { ... }; template<typename T> class derived : base { ... };
而且我经常不得不使用 static_cast 强制转换为派生类型。无论如何我可以将返回的指针存储在基数(void *?)中,所以我稍后只需要快速重新解释转换吗?