观察者模式C++中的观察者设计模式实现 2024-07-15 1 分钟阅读观察者模式{% hint style=“info” %}观察者模式的核心思想:一对多{% endhint %}传统写法简单观察者使用智能指针unique_ptrshared_ptr