From 82f1eadf8dc5e8a1da7f489a28422f9bf2c1d4ff Mon Sep 17 00:00:00 2001 From: Ed Catmur Date: Wed, 22 Feb 2023 19:33:05 +0000 Subject: [PATCH] Use BOOST_DEFAULTED_FUNCTION on empty destructors The compiler-generated copy constructor and copy assignment operator are deprecated since C++11 on classes with user-declared destructors. This change allows clean compilation with the -Wdeprecated-copy-dtor/-Wdeprecated-copy-with-user-provided-dtor flag. --- include/boost/asio/ip/bad_address_cast.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/boost/asio/ip/bad_address_cast.hpp b/include/boost/asio/ip/bad_address_cast.hpp index 7a3097a49b..a26e5eaf1f 100644 --- a/include/boost/asio/ip/bad_address_cast.hpp +++ b/include/boost/asio/ip/bad_address_cast.hpp @@ -37,7 +37,7 @@ class bad_address_cast : bad_address_cast() {} /// Destructor. - virtual ~bad_address_cast() BOOST_ASIO_NOEXCEPT_OR_NOTHROW {} + BOOST_DEFAULTED_FUNCTION(virtual ~bad_address_cast() BOOST_ASIO_NOEXCEPT_OR_NOTHROW, {}) /// Get the message associated with the exception. virtual const char* what() const BOOST_ASIO_NOEXCEPT_OR_NOTHROW