Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/src/catch2
diff options
context:
space:
mode:
authorCristian Morales Vega2024-03-11 11:33:29 +0000
committerMartin Hořeňovský2024-03-12 17:15:03 +0100
commit459ac8562b4f4b23280003beabeca910e823627a (patch)
tree6c335e4f399faee52d4c068fa2a9b8f0fddb1847 /src/catch2
parent8ac8190e494a381072c89f5e161b92a08d98b37b (diff)
downloadcatch3-459ac8562b4f4b23280003beabeca910e823627a.tar.gz
Fix build with gcc 5.4
The Core Guidelines state "A base class destructor should be either public and virtual, or protected and non-virtual" so, hopefully, no static analyser will complain.
Diffstat (limited to 'src/catch2')
-rw-r--r--src/catch2/internal/catch_decomposer.hpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/catch2/internal/catch_decomposer.hpp b/src/catch2/internal/catch_decomposer.hpp
index e693bf57..143ee3d3 100644
--- a/src/catch2/internal/catch_decomposer.hpp
+++ b/src/catch2/internal/catch_decomposer.hpp
@@ -164,14 +164,13 @@ namespace Catch {
ITransientExpression(ITransientExpression const&) = default;
ITransientExpression& operator=(ITransientExpression const&) = default;
- // We don't actually need a virtual destructor, but many static analysers
- // complain if it's not here :-(
- virtual ~ITransientExpression() = default;
-
friend std::ostream& operator<<(std::ostream& out, ITransientExpression const& expr) {
expr.streamReconstructedExpression(out);
return out;
}
+
+ protected:
+ ~ITransientExpression() = default;
};
void formatReconstructedExpression( std::ostream &os, std::string const& lhs, StringRef op, std::string const& rhs );