boost之singleton.hpp

来源:互联网 发布:大数据产业 编辑:程序博客网 时间:2024/06/18 03:32

老版本中是文件对应在 boost/pool/detail/singleton.hpp

使用时 #include <boost/pool/detail/singleton.hpp>

然后 boost::details::pool::singleton_default<Object>::instance


在新版中文件已经对应到 boost/serialization/singleton.hpp

使用时需要 #include <boost/serialization/singleton.hpp>

提供了2个方法 

boost::serialization::singleton<Object>::get_nstance()

boost::serialization::singleton<Object>::get_mutable_instance()


0 0