From e681f9d212fb83ce831b32733ca56632cc609bcc Mon Sep 17 00:00:00 2001 From: Mike Ellery Date: Tue, 23 Jul 2019 09:39:23 -0700 Subject: [PATCH] Add default dtors to satisfy -Wnon-virtual-dtor close #1664 --- CHANGELOG.md | 1 + include/boost/beast/_experimental/unit_test/suite.hpp | 4 ++++ include/boost/beast/core/async_base.hpp | 4 ++++ test/bench/parser/nodejs_parser.hpp | 2 +- 4 files changed, 10 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c3ae6873..f9698a91 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ Version 267: * Fix signed/unsigned mismatch in file_stdio::seek * basic_stream dtor cannot throw * cmake: check policy first +* Add default dtors to satisfy -Wnon-virtual-dtor -------------------------------------------------------------------------------- diff --git a/include/boost/beast/_experimental/unit_test/suite.hpp b/include/boost/beast/_experimental/unit_test/suite.hpp index 3cda8fe0..9f8d77b1 100644 --- a/include/boost/beast/_experimental/unit_test/suite.hpp +++ b/include/boost/beast/_experimental/unit_test/suite.hpp @@ -193,6 +193,10 @@ public: { } + virtual ~suite() = default; + suite(suite const&) = delete; + suite& operator=(suite const&) = delete; + /** Invokes the test using the specified runner. Data members are set up here instead of the constructor as a diff --git a/include/boost/beast/core/async_base.hpp b/include/boost/beast/core/async_base.hpp index ee6a7d7a..0d9ce379 100644 --- a/include/boost/beast/core/async_base.hpp +++ b/include/boost/beast/core/async_base.hpp @@ -249,6 +249,10 @@ public: /// Move Constructor async_base(async_base&& other) = default; + virtual ~async_base() = default; + async_base(async_base const&) = delete; + async_base& operator=(async_base const&) = delete; + /** The type of allocator associated with this object. If a class derived from @ref async_base is a completion diff --git a/test/bench/parser/nodejs_parser.hpp b/test/bench/parser/nodejs_parser.hpp index 46625e7d..68afd6f5 100644 --- a/test/bench/parser/nodejs_parser.hpp +++ b/test/bench/parser/nodejs_parser.hpp @@ -30,7 +30,7 @@ namespace http { namespace detail { -class nodejs_message_category +class nodejs_message_category final : public boost::system::error_category { public: