admin管理员组文章数量:1130349
一、完整报错:
error: no matching function for call to ‘min(__gnu_cxx::__alloc_traits<std::allocator<int>,int>::value_type&, float)
outbbox.height = std::min(search_area_[1], static_cast<float>(frame.rows) - outbbox.y);// 防止越界处理
二、原因:
search_area_[1] 和 static_cast<float>(frame.rows) - outbbox.y 两个数据类型不同造成的。
三、解决办法:
使用时,需告诉编译器参数类型。
正确写法:
outbbox.height = std::min<float一、完整报错:
error: no matching function for call to ‘min(__gnu_cxx::__alloc_traits<std::allocator<int>,int>::value_type&, float)
outbbox.height = std::min(search_area_[1], static_cast<float>(frame.rows) - outbbox.y);// 防止越界处理
二、原因:
search_area_[1] 和 static_cast<float>(frame.rows) - outbbox.y 两个数据类型不同造成的。
三、解决办法:
使用时,需告诉编译器参数类型。
正确写法:
outbbox.height = std::min<float本文标签: 报错functioncallmatchingmin
版权声明:本文标题:C++——报错解决:error: no matching function for call to ‘min(__gnu_cxx::__alloc_traits<std::allocator<int> 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://it.en369.cn/jiaocheng/1763933410a2972714.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。


发表评论