当前位置:网站首页>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 :
边栏推荐
- 【全民编程】《软件编程-讲课视频》【零基础入门到实战应用】
- Positioning (relative positioning, absolute positioning, fixed positioning, Z-index) 2022-2-11
- C programming learning notes [edited by Mr. Tan Haoqiang] (Chapter III sequence programming) 03 operators and expressions
- 【学习笔记】seckill-秒杀项目--(11)项目总结
- Learning notes of C programming [compiled by Mr. Tan Haoqiang] (Chapter III sequence programming) 04 C sentence
- Web会话管理安全问题
- 【AI实战】应用xgboost.XGBRegressor搭建空气质量预测模型(一)
- 释放数据力量的Ceph-尚文网络xUP楠哥
- sigaction的使用
- Nanning water leakage detection: warmly congratulate Guangxi Zhongshui on winning the first famous brand in Guangxi
猜你喜欢

Applet get user avatar and nickname

Introduction à mongodb

Avec trois. JS fait une scène 3D simple

Lvgl usage experience

Web会话管理安全问题

编译文件时报错:错误: 编码GBK的不可映射字符

简易版 微信小程序开发之页面跳转、数据绑定、获取用户信息、获取用户位置信息

Pytorch轻量级可视化工具wandb(local)
![C programming learning notes [edited by Mr. Tan Haoqiang] (Chapter III sequence programming) 03 operators and expressions](/img/4a/1df03d9f3315debb4c335260ed39f2.jpg)
C programming learning notes [edited by Mr. Tan Haoqiang] (Chapter III sequence programming) 03 operators and expressions

TCP/IP模型中的重磅嘉宾TCP--尚文网络奎哥
随机推荐
机械臂速成小指南(八):运动学建模(标准DH法)
Don't use the new Dede collection without the updated Dede plug-in
二进制流转换成字节数组
Advanced redis applications [password protection, data persistence, master-slave synchronization, sentinel mode, transactions] [not completed yet (semi-finished products)]
[learning notes] seckill - seckill project - (11) project summary
Section 26 detailed explanation and demonstration of IPSec virtual private network configuration experiment - simulation experiment based on packettracer8.0
Change and access of median value of listening object
Pytorch轻量级可视化工具wandb(local)
递归使用和多维数组对象变一维数组对象
Recursion: quick sort, merge sort and heap sort
FileZilla Client下載安裝
Latest version of NPM: the "NPM" item cannot be recognized as the name of a cmdlet, function, script file, or runnable program. Please check
如何迈向IPv6之IPv6过渡技术-尚文网络奎哥
MongoDB安装 & 部署
Ffmpeg recording screen and screenshot
Applet get user avatar and nickname
Lvgl usage experience
ffmpeg录制屏幕和截屏
npm : 无法将“npm”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。请检查名称的拼写,如果包括路径,请确保路径正确,然后再试一次。
动态规划:最长回文子串和子序列