-Wnon-virtual-dtor持有虚函数却不是虚析构
Posted 奇妙之二进制
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了-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.
以上是关于-Wnon-virtual-dtor持有虚函数却不是虚析构的主要内容,如果未能解决你的问题,请参考以下文章