vs2010编译boost1.44中interprocess\detail\move.hpp的错误

来源:互联网 发布:畅捷通是什么软件 编辑:程序博客网 时间:2024/06/06 08:34
1>e:\code\company\sky_guide\open_common\cpplib\boost1_44\boost\interprocess\detail\move.hpp(342): error C2440: “return”: 无法从“boost::interprocess::shared_memory_object”转换为“boost::interprocess::shared_memory_object &&”
1>          无法将左值绑定到右值引用
1>          e:\code\company\sky_guide\open_common\cpplib\boost1_44\boost\interprocess\shared_memory_object.hpp(85): 参见对正在编译的函数 模板 实例化“boost::interprocess::shared_memory_object &&boost::interprocess::move<boost::interprocess::shared_memory_object&>(T)”的引用
1>          with
1>          [
1>              T=boost::interprocess::shared_memory_object &
1>          ]
1>e:\code\company\sky_guide\open_common\cpplib\boost1_44\boost\interprocess\detail\move.hpp(342): error C2440: “return”: 无法从“boost::interprocess::mapped_region”转换为“boost::interprocess::mapped_region &&”
1>          无法将左值绑定到右值引用
1>          e:\code\company\sky_guide\open_common\cpplib\boost1_44\boost\interprocess\mapped_region.hpp(159): 参见对正在编译的函数 模板 实例化“boost::interprocess::mapped_region &&boost::interprocess::move<boost::interprocess::mapped_region&>(T)”的引用
1>          with
1>          [
1>              T=boost::interprocess::mapped_region &
1>          ]
1>

1>生成失败。


解决方法:

此错误可能是boost1.44在vs2010上一个语法不支持导致的bug,网上解决方案为更新inprocess库版本来解决,或者直接用1.46或1.47版本boost的move.hpp文件替换1.44的



原创粉丝点击