Bug #42909
open
'ceph::converting_category' has virtual functions but non-virtual destructor
Added by Willem Jan Withagen over 4 years ago.
Updated over 4 years ago.
Description
/home/jenkins/workspace/ceph-master/src/common/error_code.h:28:7: warning: 'ceph::converting_category' has virtual functions but non-virtual destructor [-Wnon-virtual-dtor]
class converting_category : public boost::system::error_category {
^
1 warning generated.
So lets declare a virtual dtor
- Pull request ID set to 31766
- Project changed from ceph-volume to devops
- Project changed from devops to ceph-volume
- Pull request ID deleted (
31766)
The Boost base class for this contains:
protected:
#if !defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) && !defined(BOOST_NO_CXX11_NON_PUBLIC_DEFAULTED_FUNCTIONS)
~error_category() = default;
#else
// We'd like to make the destructor protected, to make code that deletes
// an error_category* not compile; unfortunately, doing the below makes
// the destructor user-provided and hence breaks use after main, as the
// categories may get destroyed before code that uses them
// ~error_category() {}
#endif
So the warning is correct, and the "problem" is purposely there.
I closed the PR #31766 since that was not correct.
- Project changed from ceph-volume to devops
Still not a ceph-volume issue is it?
Also available in: Atom
PDF