Subject: Re: [Boost-bugs] [Boost C++ Libraries] #11582: Regression with -Woverloaded-virtual in unit_test_log_t
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2015-08-30 11:49:53
#11582: Regression with -Woverloaded-virtual in unit_test_log_t
------------------------------------------------+---------------------
Reporter: Ben Wiederhake <Ben.Wiederhake@â¦> | Owner: rogeeff
Type: Bugs | Status: new
Milestone: To Be Determined | Component: test
Version: Boost Development Trunk | Severity: Problem
Resolution: | Keywords:
------------------------------------------------+---------------------
Comment (by Ben Wiederhake <Ben.Wiederhake@â¦>):
This seems to be the relevant part of the inheritance hierarchy:
{{{
test_observer (observer.hpp)
:// No superclasses
virtual void test_unit_skipped( test_unit const& tu, const_string ) {
test_unit_skipped( tu ); }
virtual void test_unit_skipped( test_unit const& ) {} ///< backward
compartibility
unit_test_log_t (unit_test_log.hpp)
: test_observer
virtual void test_unit_skipped( test_unit const&, const_string );
// Actual implementation, forwards 'reason' argument as-is to a
log_formatter
progress_monitor_t (progress_monitor.hpp)
: test_observer
virtual void test_unit_skipped( test_unit const&, const_string );
// Actual implementation, ignores 'reason' argument
results_collector_t (results_collector.hpp)
: test_observer
virtual void test_unit_skipped( test_unit const&, const_string );
// Actual implementation, ignores 'reason' argument
// No further implementations of 'test_observer'
}}}
So I suggest to do the following things:
- The signatures of `progress_monitor_t` and `results_collector_t` remove
the `reason` argument in their respective method's signature.
- The classes `progress_monitor_t` and `results_collector_t` are completed
by a method `virtual void test_unit_skipped( test_unit const& tu,
const_string ) { test_unit_skipped( tu ); }` each.
- The class `unit_test_log_t` is completed by a method `virtual void
test_unit_skipped( test_unit const& ) { test_unit_skipped( tu,
const_string("<Unknown reason>") ); }` or something like that.
Plus, of course, a few tests to make sure that now the signatures
`test_unit_skipped(test_unit const&)` **and** `test_unit_skipped(test_unit
const&, const_string)` are available to all instances.
I'd love to hear why this is a good / bad idea.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/11582#comment:1> 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