当前位置:网站首页>Error c2694 "void logger:: log (nvinfer1:: ilogger:: severity, const char *)": rewrite the restrictive exception specification of virtual functions than base class virtual member functions
Error c2694 "void logger:: log (nvinfer1:: ilogger:: severity, const char *)": rewrite the restrictive exception specification of virtual functions than base class virtual member functions
2022-07-03 03:41:00 【AI vision netqi】
tensorrt c++ Report errors :
error C2694 “void Logger::log(nvinfer1::ILogger::Severity,const char *)”: The restrictive exception specification of overriding virtual functions is better than that of base class virtual member functions
problem :“Looser throw specifier for ‘xxxxxxxxxx’”
Example :
looser throw specifier for ‘virtual void Logger::log(nvinfer1::ILogger::Severity, const char*)’
solve : Reference link
Add... To the function noexcept
because , stay tensorrt8.0 The definition of function in version is :
void Logger::log(Severity severity, const char* msg) noexcept
Therefore, the corresponding function of error reporting is also changed to :
virtual void log(Severity severity, const char* msg) noexcept override;
My modified code :
void log(Severity severity, const char* msg) noexcept override
{
LogStreamConsumer(mReportableSeverity, severity) << "[TRT] " << std::string(msg) << std::endl;
}
Other reports of error Looser throw specifier The same solution , increase noexcept.
problem 2:nvinfer plugin call
Reference link :https://blog.csdn.net/XCCCCZ/article/details/121301106
An error is as follows :yololayer.h(54): warning: function “nvinfer1::IPluginV2::enqueue(int32_t, const void *const *, void *const *, void *, cudaStream_t)” is hidden by “nvinfer1::YoloLayerPlugin::enqueue” – virtual function override intended?
yololayer.cu(156): error: object of abstract class type “nvinfer1::YoloLayerPlugin” is not allowed:
pure virtual function “nvinfer1::IPluginV2::enqueue” has no overrider
yololayer.cu(299): error: object of abstract class type “nvinfer1::YoloLayerPlugin” is not allowed:
pure virtual function “nvinfer1::IPluginV2::enqueue” has no overrider
yololayer.cu(308): error: object of abstract class type “nvinfer1::YoloLayerPlugin” is not allowed:
pure virtual function “nvinfer1::IPluginV2::enqueue” has no overrider
resolvent : take virtual int enqueue(int batchSize, const voidconst * inputs, void** outputs, void workspace, cudaStream_t stream) override; Change to virtual int32_t enqueue(int32_t batchSize, void const* const* inputs, void* const* outputs, void* workspace, cudaStream_t stream) noexcept;
————————————————
Copyright notice : This paper is about CSDN Blogger 「 Cloud autumn water slow 」 The original article of , follow CC 4.0 BY-SA Copyright agreement , For reprint, please attach the original source link and this statement .
Link to the original text :https://blog.csdn.net/yunqiushuiman/article/details/125477748
This article is about the same :
边栏推荐
- FileZilla Client下载安装
- IPv6 transition technology-6to4 manual tunnel configuration experiment -- Kuige of Shangwen network
- umi 路由拦截(简单粗暴)
- leetcode:动态规划模板
- 8.8.2-PointersOnC-20220214
- Téléchargement et installation du client Filezilla
- 可分离债券与可转债
- Solve high and send system Currenttimemillis Caton
- 监听对象中值变化及访问
- Convert binary stream to byte array
猜你喜欢
Tidal characteristics of the Bohai Sea and the Yellow Sea
Avec trois. JS fait une scène 3D simple
Makefile demo
Pytoch lightweight visualization tool wandb (local)
LVGL使用心得
The series of hyperbolic function in daily problem
IPv6过渡技术-6to4手工隧道配置实验--尚文网络奎哥
Without sxid, suid & sgid will be in danger- Shangwen network xUP Nange
机械臂速成小指南(八):运动学建模(标准DH法)
Bid farewell to artificial mental retardation: Mengzi open source project team received RMB 100 million financing to help NLP develop
随机推荐
Applet (continuous update)
Applet get user avatar and nickname
MongoDB复制集【主从复制】
Why does thread crash not cause JVM crash
Ffmpeg recording screen and screenshot
简易版 微信小程序开发之for指令、上传图片及展示效果优化
js中#号的作用
Recursion: depth first search
[AI practice] Application xgboost Xgbregressor builds air quality prediction model (I)
[mathematical logic] predicate logic (individual word | individual domain | predicate | full name quantifier | existence quantifier | predicate formula | exercise)
leetcode:动态规划模板
Null and undefined
二进制流转换成字节数组
C programming learning notes [edited by Mr. Tan Haoqiang] (Chapter III sequence programming) 03 operators and expressions
Mongodb installation & Deployment
Separable bonds and convertible bonds
【DRM】DRM bridge驱动调用流程简单分析
【学习笔记】seckill-秒杀项目--(11)项目总结
VS克隆时显示403错误
Docker install and start MySQL service