摘要: //单例类 template<typename T> class Singleton { public: static T &instance() { call_once(onceFlag_, [&]{instance_ = new T(); }); return *instance_; } pri 阅读全文
posted @ 2022-05-22 11:42 _comet 阅读(52) 评论(0) 推荐(0) 编辑