contract icon indicating copy to clipboard operation
contract copied to clipboard

GCC suggest-override warnings

Open EugeneZelenko opened this issue 5 years ago • 2 comments

Complete list of warnings when Boost 1.72 is built with GCC 7.5 with -Wsuggest-override added to cxxflags:

./boost/contract/core/exception.hpp:107:25: warning: ‘virtual const char* boost::contract::bad_virtual_result_cast::what() const’ can be marked override [-Wsuggest-override]
./boost/contract/core/exception.hpp:183:25: warning: ‘virtual const char* boost::contract::assertion_failure::what() const’ can be marked override [-Wsuggest-override]

BOOST_OVERRIDE was introduced in https://github.com/boostorg/config/commit/ffe4e0f5a448578cce14e3eed0cf7163333a81d9.

EugeneZelenko avatar Apr 12 '20 19:04 EugeneZelenko

This can be fixed using BOOST_OVERRIDE that should become part of Boost.Config from the next release: https://github.com/boostorg/config/pull/329. However, I will not generate a new release or Boost.Contract only to fix warnings. I will leave this issue open. If I have to generate a new Boost.Contract release in the future, I will then fix this warning as well.

lcaminiti avatar Apr 15 '20 22:04 lcaminiti

See fixes in #28.

EugeneZelenko avatar May 23 '20 00:05 EugeneZelenko