Fix warnings for a lot of destructor called on non-final 'xxx' that has

virtual functions but non-virtual destructor [-Wdelete-non-virtual-dtor]

In file included from /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/
8.2.1/../../../../include/c++/8.2.1/algorithm:62:
In file included from /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/
8.2.1/../../../../include/c++/8.2.1/bits/stl_algo.h:62:
In file included from /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/
8.2.1/../../../../include/c++/8.2.1/bits/stl_tempbuf.h:60:
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/8.2.1/../../../../include/c++/
8.2.1/bits/stl_construct.h:98:7: warning: destructor called on non-final
'xxx' that has virtual functions but non-virtual destructor [-Wdelete-
non-virtual-dtor]
    { __pointer->~_Tp(); }
      ^
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/8.2.1/../../../../include/c++/
8.2.1/bits/stl_construct.h:108:11: note: in instantiation of function
template specialization 'std::_Destroy<xxx>' requested here
            std::_Destroy(std::__addressof(*__first));
                 ^
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/8.2.1/../../../../include/c++/
8.2.1/bits/stl_construct.h:137:2: note: in instantiation of function
template specialization 'std::_Destroy_aux<false>::__destroy<xxx *>'
requested here
        __destroy(__first, __last);
        ^
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/8.2.1/../../../../include/c++/
8.2.1/bits/stl_construct.h:206:7: note: in instantiation of function
template specialization 'std::_Destroy<xxx *>' requested here
      _Destroy(__first, __last);
      ^
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/8.2.1/../../../../include/c++/
8.2.1/bits/stl_vector.h:567:7: note: in instantiation of function
template specialization 'std::_Destroy<xxx *, xxx>' requested here
        std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish,
             ^
../../../trunk/libretroshare/src/retroshare/xxx:*:*: note: in
instantiation of member function 'std::vector<xxx, std::allocator<xxx>
>::~vector' requested here
        Something():
        ^
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/8.2.1/../../../../include/c++/
8.2.1/bits/stl_construct.h:98:19: note: qualify call to silence this
warning
    { __pointer->~_Tp(); }
                  ^
This commit is contained in:
Phenom 2019-02-14 20:40:52 +01:00
parent 164a28eb32
commit e7fa5556b0

View File

@ -37,6 +37,8 @@ struct RsSerializable
*/
virtual void serial_process(RsGenericSerializer::SerializeJob j,
RsGenericSerializer::SerializeContext& ctx) = 0;
virtual ~RsSerializable() = default;
};
/** @def RS_SERIAL_PROCESS(I)