From 2923fc93214dba831e1b5f97927b8361e32b8bdb Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Wed, 5 Feb 2025 12:23:49 +0100 Subject: [PATCH 1/5] Added deprecated attribute * ACE/ace/Copy_Disabled.h: --- ACE/ace/Copy_Disabled.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ACE/ace/Copy_Disabled.h b/ACE/ace/Copy_Disabled.h index 264dec106cb16..99d0500a5b8e6 100644 --- a/ACE/ace/Copy_Disabled.h +++ b/ACE/ace/Copy_Disabled.h @@ -43,7 +43,7 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL * // code here * }; */ -class ACE_Export ACE_Copy_Disabled +class ACE_Export [[deprecated]] ACE_Copy_Disabled { public: /// Default constructor From a60c7a67b47de6945af6a7fd0b1abd1279b1e39f Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Wed, 5 Feb 2025 12:26:48 +0100 Subject: [PATCH 2/5] Try before export * ACE/ace/Copy_Disabled.h: --- ACE/ace/Copy_Disabled.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ACE/ace/Copy_Disabled.h b/ACE/ace/Copy_Disabled.h index 99d0500a5b8e6..10ef412811dde 100644 --- a/ACE/ace/Copy_Disabled.h +++ b/ACE/ace/Copy_Disabled.h @@ -43,7 +43,7 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL * // code here * }; */ -class ACE_Export [[deprecated]] ACE_Copy_Disabled +class [[deprecated]] ACE_Export ACE_Copy_Disabled { public: /// Default constructor From 7e8912c8465f646c15af0f4747b7d0c42d2425b6 Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Wed, 5 Feb 2025 12:28:28 +0100 Subject: [PATCH 3/5] Mark constructor ACE_Copy_Disabled as default, removed cpp * ACE/ace/Copy_Disabled.cpp: Deleted. * ACE/ace/Copy_Disabled.h: * ACE/ace/ace.mpc: * ACE/ace/ace_for_tao.mpc: --- ACE/ace/Copy_Disabled.cpp | 15 --------------- ACE/ace/Copy_Disabled.h | 2 +- ACE/ace/ace.mpc | 2 +- ACE/ace/ace_for_tao.mpc | 2 +- 4 files changed, 3 insertions(+), 18 deletions(-) delete mode 100644 ACE/ace/Copy_Disabled.cpp diff --git a/ACE/ace/Copy_Disabled.cpp b/ACE/ace/Copy_Disabled.cpp deleted file mode 100644 index 57fdb0df0f845..0000000000000 --- a/ACE/ace/Copy_Disabled.cpp +++ /dev/null @@ -1,15 +0,0 @@ -/** - * @file Copy_Disabled.cpp - * - * @author Carlos O'Ryan - */ - -#include "ace/Copy_Disabled.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_Copy_Disabled::ACE_Copy_Disabled () -{ -} - -ACE_END_VERSIONED_NAMESPACE_DECL diff --git a/ACE/ace/Copy_Disabled.h b/ACE/ace/Copy_Disabled.h index 10ef412811dde..f2480aba9fe34 100644 --- a/ACE/ace/Copy_Disabled.h +++ b/ACE/ace/Copy_Disabled.h @@ -47,7 +47,7 @@ class [[deprecated]] ACE_Export ACE_Copy_Disabled { public: /// Default constructor - ACE_Copy_Disabled (); + ACE_Copy_Disabled () = default; private: ACE_Copy_Disabled (const ACE_Copy_Disabled &) = delete; diff --git a/ACE/ace/ace.mpc b/ACE/ace/ace.mpc index 687e0e7c1902e..0c1f3a1b8326c 100644 --- a/ACE/ace/ace.mpc +++ b/ACE/ace/ace.mpc @@ -44,7 +44,6 @@ project(ACE) : ace_output, acedefaults, install, other, codecs, token, svcconf, Configuration_Import_Export.cpp Connection_Recycling_Strategy.cpp Containers.cpp - Copy_Disabled.cpp Date_Time.cpp DEV.cpp DEV_Addr.cpp @@ -400,6 +399,7 @@ project(ACE) : ace_output, acedefaults, install, other, codecs, token, svcconf, CORBA_macros.h Codeset_Symbols.h Condition_T.h + Copy_Disabled.h Countdown_Time.h Default_Constants.h Event_Base.h diff --git a/ACE/ace/ace_for_tao.mpc b/ACE/ace/ace_for_tao.mpc index 5d6f8f2113d81..dd19be40b402b 100644 --- a/ACE/ace/ace_for_tao.mpc +++ b/ACE/ace/ace_for_tao.mpc @@ -37,7 +37,6 @@ project(ACE_FOR_TAO) : acedefaults, install, svcconf, uuid, versioned_namespace, Condition_Attributes.cpp Condition_Recursive_Thread_Mutex.cpp Condition_Thread_Mutex.cpp - Copy_Disabled.cpp DLL_Manager.cpp Dirent.cpp // Required by TAO_IDL Dirent_Selector.cpp @@ -307,6 +306,7 @@ project(ACE_FOR_TAO) : acedefaults, install, svcconf, uuid, versioned_namespace, Bound_Ptr.h CORBA_macros.h Condition_T.h + Copy_Disabled.h Countdown_Time.h Default_Constants.h Event_Base.h From f83abbb2a8921c4ef22068c9137854e47dcd0fc9 Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Wed, 5 Feb 2025 12:30:01 +0100 Subject: [PATCH 4/5] Added docu * ACE/ace/Copy_Disabled.h: --- ACE/ace/Copy_Disabled.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/ACE/ace/Copy_Disabled.h b/ACE/ace/Copy_Disabled.h index f2480aba9fe34..cc134db3b3630 100644 --- a/ACE/ace/Copy_Disabled.h +++ b/ACE/ace/Copy_Disabled.h @@ -42,6 +42,18 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL * { * // code here * }; + * + * @deprecated This class is deprecated. Instead of using inheritance, + * directly delete copy operations in your class: + * + * class Foo + * { + * public: + * Foo(const Foo&) = delete; + * Foo(Foo&&) = delete; + * Foo& operator=(const Foo&) = delete; + * Foo& operator=(Foo&&) = delete; + * }; */ class [[deprecated]] ACE_Export ACE_Copy_Disabled { From afe6592b734e02eaab2aca182938403eb711aa7b Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Wed, 5 Feb 2025 12:47:33 +0100 Subject: [PATCH 5/5] Removed export macro as this is now header only * ACE/ace/Copy_Disabled.h: --- ACE/ace/Copy_Disabled.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ACE/ace/Copy_Disabled.h b/ACE/ace/Copy_Disabled.h index cc134db3b3630..d489a874575e3 100644 --- a/ACE/ace/Copy_Disabled.h +++ b/ACE/ace/Copy_Disabled.h @@ -13,7 +13,7 @@ #include /**/ "ace/pre.h" -#include /**/ "ace/ACE_export.h" +#include /**/ "ace/config-lite.h" #if !defined (ACE_LACKS_PRAGMA_ONCE) # pragma once @@ -55,7 +55,7 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL * Foo& operator=(Foo&&) = delete; * }; */ -class [[deprecated]] ACE_Export ACE_Copy_Disabled +class [[deprecated]] ACE_Copy_Disabled { public: /// Default constructor