Skip to content

败犬日报 2025-07-18

1. Timing wheel心跳机制(文章)

https://journey-c.github.io/timing-wheel/

近似 O(1) 的计时器管理算法。

2. shared_ptr 不能协变

意思是如果 Derived 继承 Base,那么 shared_ptr<Derived> 继承 shared_ptr<Base>

确实没什么好办法。只能都写成 shared_ptr<Base>,需要时 dynamic_pointer_cast。

3. trivial,标准布局,POD 的区分(文章)

https://learn.microsoft.com/en-us/cpp/cpp/trivial-standard-layout-and-pod-types?view=msvc-170