我是使用 boost 的新手,但遇到了问题。我的项目中需要 shared_mutex 函数。所以我已经完成了
#include "boost/thread/shared_mutex.hpp"
并编译了我的项目。我的带有“将警告视为错误”的 MSVC 2005 由于出现警告而停止编译:
c:\\...\microsec_time_clock.hpp(103) : warning C4244: 'argument' : conversion from 'int' to 'unsigned short', possible loss of data
我不知道,为什么 shared_mutex 需要微秒函数(我读过比 boost 库有相当大的依赖列表),但我无法编译我的项目。我用谷歌搜索了一下,发现同样的问题,但没有决定。
更新:我现在正在编译 boost,但我想将所有源代码放入我的开源项目,包括 boost.thread.shared_mutex。