您当前的位置: 首页 >  c++
  • 0浏览

    0关注

    1477博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

C++ TBB concurrent_unordered_map find() at() return static_cast<size_t>( t ) * internal::hash_multip

软件工程小施同学 发布时间:2021-10-15 00:02:27 ,浏览量:0

使用find或者count报错

 error: invalid static_cast from type ‘const dev::FixedHash’ to type ‘std::size_t {aka long unsigned int}’

解决方案

传递第三个参数,即hash函数,如下

tbb::concurrent_unordered_map m_vtxs;

concurrent_unordered_map 类 - 游戏蛮牛 - C++中文翻译用户手册

concurrent_unordered_map — oneAPI Specification 1.0-rev-3 documentation

如果要自定义比较函数,参考TBB之concurrent_hash_map_wenion的博客-CSDN博客 

关注
打赏
1665320866
查看更多评论
立即登录/注册

微信扫码登录

0.0403s