千万不要忘记多态还有静态多态
静态多态有:1.函数重载。2.模板方法
CRTP也是一种实现静态多态的方法:
template<typename T>
class Base
{
public:
void method()
{
static_cast<T*>(this
千万不要忘记多态还有静态多态
静态多态有:1.函数重载。2.模板方法
CRTP也是一种实现静态多态的方法:
template<typename T>
class Base
{
public:
void method()
{
static_cast<T*>(this