Personal channel of @lancern

Topics: programming, hacking, memes, life, and more. Forward anything as you wish.

Join the discussion group for more fun.

Discord: https://discord.gg/RwUx9et7
#存储引擎
非常好的存储引擎文档,总共176页幻灯片:《Bedtime Stories For Children: Storage Engines》,可惜的是没有完全写完。
发现一个完全没用的 C++ 语言“特性”

可以使用 = delete 来定义一个虚函数:


struct B { virtual void m() = delete; };


但是在子类中,你也必须使用 = delete 来定义对 m 的重写:


struct D : B {
  void m() override;  // ERROR
  void m() override = delete;  // OK
};


另外,在子类中你也不能使用 = delete 来重写一个在父类中没有被定义为 = delete 的虚函数:


struct B { virtual void m(); };
struct D : B {
  void m() override = delete;  // ERROR
};
Back to Top