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