Skip to content

Commit

Permalink
Merge pull request #2324 from jwillemsen/jwi-depcopydisabled
Browse files Browse the repository at this point in the history
Added deprecated attribute to ACE_Copy_Disabled
  • Loading branch information
jwillemsen authored Feb 5, 2025
2 parents a6a1599 + afe6592 commit 0718af0
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 20 deletions.
15 changes: 0 additions & 15 deletions ACE/ace/Copy_Disabled.cpp

This file was deleted.

18 changes: 15 additions & 3 deletions ACE/ace/Copy_Disabled.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -42,12 +42,24 @@ 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 ACE_Export ACE_Copy_Disabled
class [[deprecated]] ACE_Copy_Disabled
{
public:
/// Default constructor
ACE_Copy_Disabled ();
ACE_Copy_Disabled () = default;

private:
ACE_Copy_Disabled (const ACE_Copy_Disabled &) = delete;
Expand Down
2 changes: 1 addition & 1 deletion ACE/ace/ace.mpc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion ACE/ace/ace_for_tao.mpc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 0718af0

Please sign in to comment.