Hello,
compiling with clang++ 6.0 triggers a warning about not having virtual destructor in failure_formatter while also having virtual functions.
Despite the fact that it currently shouldn't result in any bugs, it could lead to obscure problems later once any type inheriting from failure_formatter would contain any data member requiring destructor.
Even aside from that, this is also a problem for all people treating warnings as errors.
Thus, my recommendation is simple addition of following line
virtual void ~failure_formatter() {}
Hello, compiling with
clang++
6.0 triggers a warning about not having virtual destructor infailure_formatter
while also having virtual functions. Despite the fact that it currently shouldn't result in any bugs, it could lead to obscure problems later once any type inheriting fromfailure_formatter
would contain any data member requiring destructor. Even aside from that, this is also a problem for all people treating warnings as errors.Thus, my recommendation is simple addition of following line
virtual void ~failure_formatter() {}