C/C++编译错误收集-Wnon-virtual-dtor持有虚函数却不是虚析构
Posted 奇妙之二进制
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了C/C++编译错误收集-Wnon-virtual-dtor持有虚函数却不是虚析构相关的知识,希望对你有一定的参考价值。
-Wnon-virtual-dtor (C++ and Objective-C++ only)
Warn when a class has virtual functions and an accessible non-virtual destructor itself or in an accessible polymorphic base class, in which case it is possible but unsafe to delete an instance of a derived class through a pointer to the class itself or base class. This warning is automatically enabled if -Weffc++ is specified.
以上是关于C/C++编译错误收集-Wnon-virtual-dtor持有虚函数却不是虚析构的主要内容,如果未能解决你的问题,请参考以下文章
C/C++编译错误收集-Wnon-virtual-dtor持有虚函数却不是虚析构
C/C++编译错误收集non-trivial designated initializers not supported
c/c++编译错误收集error: jump to case label
c/c++编译错误收集error: jump to case label [-fpermissive] crosses initialization of ‘xxx‘