Boost logo

Boost :

From: Phil Endecott (spam_from_boost_dev_at_[hidden])
Date: 2008-02-08 09:06:59


I get lots of warnings when I compile code using the logging library
with g++ 4.1.3 with -W -Wall. I think they're all "class with virtual
functions has non-virtual destructor", e.g.

/usr/local/src/boost-logging/boost/logging/detail/logger_base.hpp: In
instantiation of
‘boost::logging::detail::default_cache_keeper<boost::logging::detail::cache_before_init<std::basic_string<char,
std::char_traits<char>, std::allocator<char> > > >’:
/usr/local/src/boost-logging/boost/logging/detail/logger_base.hpp:126:
instantiated from
‘boost::logging::logger_base<boost::logging::gather::ostream_like::return_str<std::basic_string<char,
std::char_traits<char>, std::allocator<char> >,
std::basic_ostringstream<char, std::char_traits<char>,
std::allocator<char> > >, boost::logging::default_, boost::logging::override>’
/usr/local/src/boost-logging/boost/logging/detail/logger.hpp:214:
instantiated from
‘boost::logging::logger<boost::logging::gather::ostream_like::return_str<std::basic_string<char,
std::char_traits<char>, std::allocator<char> >,
std::basic_ostringstream<char, std::char_traits<char>,
std::allocator<char> > >, boost::logging::default_>’
Session.cc:203: instantiated from here
/usr/local/src/boost-logging/boost/logging/detail/logger_base.hpp:53:
warning: ‘struct
boost::logging::detail::default_cache_keeper<boost::logging::detail::cache_before_init<std::basic_string<char,
std::char_traits<char>, std::allocator<char> > > >’ has virtual
functions but non-virtual destructor
/usr/local/src/boost-logging/boost/logging/detail/logger_base.hpp: In
instantiation of
‘boost::logging::logger_base<boost::logging::gather::ostream_like::return_str<std::basic_string<char,
std::char_traits<char>, std::allocator<char> >,
std::basic_ostringstream<char, std::char_traits<char>,
std::allocator<char> > >, boost::logging::default_, boost::logging::override>’:
/usr/local/src/boost-logging/boost/logging/detail/logger.hpp:214:
instantiated from
‘boost::logging::logger<boost::logging::gather::ostream_like::return_str<std::basic_string<char,
std::char_traits<char>, std::allocator<char> >,
std::basic_ostringstream<char, std::char_traits<char>,
std::allocator<char> > >, boost::logging::default_>’
Session.cc:203: instantiated from here
/usr/local/src/boost-logging/boost/logging/detail/logger_base.hpp:126:
warning: ‘struct
boost::logging::logger_base<boost::logging::gather::ostream_like::return_str<std::basic_string<char,
std::char_traits<char>, std::allocator<char> >,
std::basic_ostringstream<char, std::char_traits<char>,
std::allocator<char> > >, boost::logging::default_,
boost::logging::override>’ has virtual functions but non-virtual destructor

These are too verbose to ignore, even if they are harmless. Can they
be fixed?

Phil.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk