Subject: Re: [Boost-bugs] [Boost C++ Libraries] #6824: warning: delete called on boost::error_info... that has virtual functions but non-virtual destructor
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2015-02-27 22:09:52
#6824: warning: delete called on boost::error_info... that has virtual functions
but non-virtual destructor
--------------------------------------------+----------------------------
Reporter: Richard Powell <rmpowell77@â¦> | Owner: emildotchevski
Type: Bugs | Status: reopened
Milestone: To Be Determined | Component: exception
Version: Boost 1.56.0 | Severity: Problem
Resolution: | Keywords:
--------------------------------------------+----------------------------
Comment (by steven_watanabe):
Replying to [comment:10 anonymous]:
> I really appreciate your desire to help.
>
>
> {{{
> In file included from .../boost/smart_ptr/shared_ptr.hpp:30:0,
> from .../boost/shared_ptr.hpp:17,
> from safeFeatureKeyTests.cc:17:
> .../boost/checked_delete.hpp: In instantiation of 'void
boost::checked_delete(T*) [with T = safe::SetFeatureUseOp]':
> .../boost/smart_ptr/detail/shared_count.hpp:95:38: required from
'boost::detail::shared_count::shared_count(Y*) [with Y =
safe::SetFeatureUseOp]'
> .../boost/smart_ptr/shared_ptr.hpp:183:50: required from
'boost::shared_ptr<T>::shared_ptr(Y*) [with Y = safe::SetFeatureUseOp; T =
safe::TestOperation]'
> safeFeatureKeyTests.cc:452:9: required from here
> .../boost/checked_delete.hpp:34:5: warning: deleting object of
polymorphic class type 'safe::SetFeatureUseOp' which has non-virtual
destructor might cause undefined behaviour [-Wdelete-non-virtual-dtor]
> delete x;
> ^
> }}}
This is not a Boost issue. The error message only appears inside Boost
because boost::shared_ptr has to call delete. The class that is causing
the warning is not related to Boost in any way.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/6824#comment:17> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:18 UTC