From 7660e58de0213cbb2dcedb38fea447136597b80b Mon Sep 17 00:00:00 2001 From: Ed Catmur Date: Wed, 22 Feb 2023 19:55:51 +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/thread/exceptions.hpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/include/boost/thread/exceptions.hpp b/include/boost/thread/exceptions.hpp index 2a5094bd5..7dcb565b6 100644 --- a/include/boost/thread/exceptions.hpp +++ b/include/boost/thread/exceptions.hpp @@ -56,8 +56,7 @@ namespace boost { } - ~thread_exception() BOOST_NOEXCEPT_OR_NOTHROW - {} + BOOST_DEFAULTED_FUNCTION(~thread_exception() BOOST_NOEXCEPT_OR_NOTHROW, {}) int native_error() const @@ -113,8 +112,7 @@ namespace boost { } - ~lock_error() BOOST_NOEXCEPT_OR_NOTHROW - {} + BOOST_DEFAULTED_FUNCTION(~lock_error() BOOST_NOEXCEPT_OR_NOTHROW, {}) }; @@ -141,8 +139,7 @@ namespace boost } - ~thread_resource_error() BOOST_NOEXCEPT_OR_NOTHROW - {} + BOOST_DEFAULTED_FUNCTION(~thread_resource_error() BOOST_NOEXCEPT_OR_NOTHROW, {}) };