c++11中线程安全单例模式( Meyers Singleton)

class Singleton { public: static Singleton& Instance() { static Singleton theSingleton; return theSingleton; } /* more (non-static) functions here */ private: Singleton(); // ctor hidden Singleton
相关文章
相关标签/搜索