summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2020-12-10 08:29:09 +0100
committerGitHub <noreply@github.com>2020-12-10 08:29:09 +0100
commitfc1845b702d0a269abfbe102819f79556c55eaf6 (patch)
treec2032bbe87f866489098d3186c862f3d74a72161
parentc00ccad0dff58a535eb8e457220b5279acc8791d (diff)
parentbc9e84e3d2c6eefee87f659262f43907fae5a766 (diff)
downloadATCD-fc1845b702d0a269abfbe102819f79556c55eaf6.tar.gz
Merge pull request #1342 from jwillemsen/jwi-cleanupcpp11
Removed checks for ACE_HAS_CPP11 and use std::atomic in more places i…
-rw-r--r--TAO/orbsvcs/ImplRepo_Service/LiveCheck.h10
-rw-r--r--TAO/orbsvcs/ImplRepo_Service/Shared_Backing_Store.cpp4
-rw-r--r--TAO/orbsvcs/orbsvcs/Naming/Naming_Server.cpp8
-rw-r--r--TAO/tao/AnyTypeCode/Any_Array_Impl_T.cpp4
-rw-r--r--TAO/tao/AnyTypeCode/Any_Basic_Impl.cpp4
-rw-r--r--TAO/tao/AnyTypeCode/Any_Basic_Impl_T.cpp4
-rw-r--r--TAO/tao/AnyTypeCode/Any_Dual_Impl_T.cpp8
-rw-r--r--TAO/tao/AnyTypeCode/Any_Impl.h14
-rw-r--r--TAO/tao/AnyTypeCode/Any_Impl_T.cpp4
-rw-r--r--TAO/tao/AnyTypeCode/Any_Special_Impl_T.cpp4
-rw-r--r--TAO/tao/AnyTypeCode/Any_SystemException.cpp4
-rw-r--r--TAO/tao/AnyTypeCode/NVList.cpp4
-rw-r--r--TAO/tao/AnyTypeCode/NVList.h14
-rw-r--r--TAO/tao/AnyTypeCode/True_RefCount_Policy.h10
-rw-r--r--TAO/tao/CDR.h2
-rw-r--r--TAO/tao/CDR.inl8
-rw-r--r--TAO/tao/Codeset/UTF16_BOM_Translator.cpp4
-rw-r--r--TAO/tao/Codeset/UTF8_Latin1_Translator.cpp4
-rw-r--r--TAO/tao/Connector_Registry.cpp4
-rw-r--r--TAO/tao/DynamicInterface/AMH_DSI_Response_Handler.cpp4
-rw-r--r--TAO/tao/DynamicInterface/Context.h14
-rw-r--r--TAO/tao/DynamicInterface/ExceptionList.h10
-rw-r--r--TAO/tao/DynamicInterface/Request.h10
-rw-r--r--TAO/tao/DynamicInterface/Server_Request.h10
-rw-r--r--TAO/tao/Dynamic_TP/DTP_Task.cpp4
-rw-r--r--TAO/tao/Dynamic_TP/DTP_Task.h3
-rw-r--r--TAO/tao/Dynamic_TP/DTP_Thread_Pool.cpp4
-rw-r--r--TAO/tao/IORManipulation/IORManipulation.cpp13
-rw-r--r--TAO/tao/Intrusive_Ref_Count_Base_T.h11
-rw-r--r--TAO/tao/Load_Protocol_Factory_T.h4
-rw-r--r--TAO/tao/ORB.h10
-rw-r--r--TAO/tao/ORB.inl4
-rw-r--r--TAO/tao/ORB_Core.cpp4
-rw-r--r--TAO/tao/ORB_Core.h10
-rw-r--r--TAO/tao/ORB_Core.inl4
-rw-r--r--TAO/tao/Object.cpp4
-rw-r--r--TAO/tao/Object.h6
-rw-r--r--TAO/tao/Object_KeyC.h2
-rw-r--r--TAO/tao/PortableServer/Active_Object_Map.cpp33
-rw-r--r--TAO/tao/PortableServer/Active_Object_Map.h24
-rw-r--r--TAO/tao/PortableServer/Object_Adapter.cpp12
-rw-r--r--TAO/tao/PortableServer/Root_POA.cpp4
-rw-r--r--TAO/tao/PortableServer/ServantRetentionStrategyNonRetain.h4
-rw-r--r--TAO/tao/PortableServer/ServantRetentionStrategyRetain.h4
-rw-r--r--TAO/tao/PortableServer/Servant_Base.cpp4
-rw-r--r--TAO/tao/PortableServer/Servant_Base.h8
-rw-r--r--TAO/tao/Principal.h10
-rw-r--r--TAO/tao/Profile.h12
-rw-r--r--TAO/tao/RTCORBA/Thread_Pool.cpp4
-rw-r--r--TAO/tao/RTScheduling/Current.cpp2
-rw-r--r--TAO/tao/RTScheduling/Current.h2
-rw-r--r--TAO/tao/RTScheduling/Request_Interceptor.cpp2
-rw-r--r--TAO/tao/RTScheduling/Request_Interceptor.h2
-rw-r--r--TAO/tao/Reply_Dispatcher.cpp4
-rw-r--r--TAO/tao/Reply_Dispatcher.h2
-rw-r--r--TAO/tao/Stub.cpp4
-rw-r--r--TAO/tao/Stub.h12
-rw-r--r--TAO/tao/Stub.inl2
-rw-r--r--TAO/tao/Synch_Invocation.cpp8
-rw-r--r--TAO/tao/Valuetype/AbstractBase.h14
-rw-r--r--TAO/tao/Valuetype/ValueBase.cpp4
-rw-r--r--TAO/tao/Valuetype/ValueBase.h10
-rw-r--r--TAO/tao/Valuetype/ValueFactory.h10
63 files changed, 34 insertions, 412 deletions
diff --git a/TAO/orbsvcs/ImplRepo_Service/LiveCheck.h b/TAO/orbsvcs/ImplRepo_Service/LiveCheck.h
index 6437f7c289c..4d0602ddfca 100644
--- a/TAO/orbsvcs/ImplRepo_Service/LiveCheck.h
+++ b/TAO/orbsvcs/ImplRepo_Service/LiveCheck.h
@@ -22,11 +22,7 @@
#endif /* ACE_LACKS_PRAGMA_ONCE */
#include "tao/Intrusive_Ref_Count_Handle_T.h"
-#if defined (ACE_HAS_CPP11)
-# include <atomic>
-#else
-# include "ace/Atomic_Op.h"
-#endif /* ACE_HAS_CPP11 */
+#include <atomic>
class LiveCheck;
class LiveEntry;
@@ -96,11 +92,7 @@ class Locator_Export LiveListener
ACE_CString server_;
private:
-#if defined (ACE_HAS_CPP11)
std::atomic<int> refcount_;
-#else
- ACE_Atomic_Op<TAO_SYNCH_MUTEX, int> refcount_;
-#endif /* ACE_HAS_CPP11 */
};
typedef TAO_Intrusive_Ref_Count_Handle<LiveListener> LiveListener_ptr;
diff --git a/TAO/orbsvcs/ImplRepo_Service/Shared_Backing_Store.cpp b/TAO/orbsvcs/ImplRepo_Service/Shared_Backing_Store.cpp
index 4d1a0915e3c..8f06171529d 100644
--- a/TAO/orbsvcs/ImplRepo_Service/Shared_Backing_Store.cpp
+++ b/TAO/orbsvcs/ImplRepo_Service/Shared_Backing_Store.cpp
@@ -161,11 +161,7 @@ namespace {
#endif
}
-#if defined (ACE_HAS_CPP11)
std::unique_ptr <ACE_File_Lock> file_lock_;
-#else
- auto_ptr<ACE_File_Lock> file_lock_;
-#endif
FILE* file_;
int flags_;
bool locked_;
diff --git a/TAO/orbsvcs/orbsvcs/Naming/Naming_Server.cpp b/TAO/orbsvcs/orbsvcs/Naming/Naming_Server.cpp
index 2d9b6fa4280..448c6100d03 100644
--- a/TAO/orbsvcs/orbsvcs/Naming/Naming_Server.cpp
+++ b/TAO/orbsvcs/orbsvcs/Naming/Naming_Server.cpp
@@ -483,11 +483,7 @@ TAO_Naming_Server::init_new_naming (CORBA::ORB_ptr orb,
TAO::Storable_Factory* pf = 0;
ACE_CString directory (ACE_TEXT_ALWAYS_CHAR (persistence_location));
ACE_NEW_RETURN (pf, TAO::Storable_FlatFileFactory (directory), -1);
-#if defined (ACE_HAS_CPP11)
std::unique_ptr<TAO::Storable_Factory> persFactory(pf);
-#else
- auto_ptr<TAO::Storable_Factory> persFactory(pf);
-#endif /* ACE_HAS_CPP11 */
// Use an auto_ptr to ensure that we clean up the factory in the case
// of a failure in creating and registering the Activator.
@@ -495,11 +491,7 @@ TAO_Naming_Server::init_new_naming (CORBA::ORB_ptr orb,
this->storable_naming_context_factory (context_size);
// Make sure we got a factory
if (cf == 0) return -1;
-#if defined (ACE_HAS_CPP11)
std::unique_ptr<TAO_Storable_Naming_Context_Factory> contextFactory (cf);
-#else
- auto_ptr<TAO_Storable_Naming_Context_Factory> contextFactory (cf);
-#endif /* ACE_HAS_CPP11 */
// This instance will either get deleted after recreate all or,
// in the case of a servant activator's use, on destruction of the
diff --git a/TAO/tao/AnyTypeCode/Any_Array_Impl_T.cpp b/TAO/tao/AnyTypeCode/Any_Array_Impl_T.cpp
index 48dfb7e9f17..9222c88dbce 100644
--- a/TAO/tao/AnyTypeCode/Any_Array_Impl_T.cpp
+++ b/TAO/tao/AnyTypeCode/Any_Array_Impl_T.cpp
@@ -93,11 +93,7 @@ TAO::Any_Array_Impl_T<T_slice, T_forany>::extract (const CORBA::Any & any,
T_forany::tao_alloc ()),
false);
-#if defined (ACE_HAS_CPP11)
std::unique_ptr<TAO::Any_Array_Impl_T<T_slice, T_forany> > replacement_safety (replacement);
-#else
- auto_ptr<TAO::Any_Array_Impl_T<T_slice, T_forany> > replacement_safety (replacement);
-#endif /* ACE_HAS_CPP11 */
// We know this will work since the unencoded case is covered above.
TAO::Unknown_IDL_Type * const unk =
diff --git a/TAO/tao/AnyTypeCode/Any_Basic_Impl.cpp b/TAO/tao/AnyTypeCode/Any_Basic_Impl.cpp
index 4d3eb62685a..8273695fffd 100644
--- a/TAO/tao/AnyTypeCode/Any_Basic_Impl.cpp
+++ b/TAO/tao/AnyTypeCode/Any_Basic_Impl.cpp
@@ -116,11 +116,7 @@ namespace TAO
TAO::Any_Basic_Impl *replacement =
TAO::Any_Basic_Impl::create_empty (any_tc);
-#if defined (ACE_HAS_CPP11)
std::unique_ptr<TAO::Any_Basic_Impl> replacement_safety (replacement);
-#else
- auto_ptr<TAO::Any_Basic_Impl> replacement_safety (replacement);
-#endif /* ACE_HAS_CPP11 */
// We know this will work since the unencoded case is covered above.
TAO::Unknown_IDL_Type * const unk =
diff --git a/TAO/tao/AnyTypeCode/Any_Basic_Impl_T.cpp b/TAO/tao/AnyTypeCode/Any_Basic_Impl_T.cpp
index a45b3b2481b..7e82b968f9f 100644
--- a/TAO/tao/AnyTypeCode/Any_Basic_Impl_T.cpp
+++ b/TAO/tao/AnyTypeCode/Any_Basic_Impl_T.cpp
@@ -78,11 +78,7 @@ TAO::Any_Basic_Impl_T<T>::extract (const CORBA::Any & any,
TAO::Any_Basic_Impl_T<T> * const replacement =
TAO::Any_Basic_Impl_T<T>::create_empty (any_tc);
-#if defined (ACE_HAS_CPP11)
std::unique_ptr<TAO::Any_Basic_Impl_T<T> > replacement_safety (replacement);
-#else
- auto_ptr<TAO::Any_Basic_Impl_T<T> > replacement_safety (replacement);
-#endif /* ACE_HAS_CPP11 */
// We know this will work since the unencoded case is covered above.
TAO::Unknown_IDL_Type * const unk =
diff --git a/TAO/tao/AnyTypeCode/Any_Dual_Impl_T.cpp b/TAO/tao/AnyTypeCode/Any_Dual_Impl_T.cpp
index 42cc10a0066..41bb34ba6aa 100644
--- a/TAO/tao/AnyTypeCode/Any_Dual_Impl_T.cpp
+++ b/TAO/tao/AnyTypeCode/Any_Dual_Impl_T.cpp
@@ -158,11 +158,7 @@ TAO::Any_Dual_Impl_T<T>::replace (TAO_InputCDR &cdr,
ACE_NEW_RETURN (empty_value,
T,
false);
-#if defined (ACE_HAS_CPP11)
std::unique_ptr<T> empty_value_safety (empty_value);
-#else
- auto_ptr<T> empty_value_safety (empty_value);
-#endif /* ACE_HAS_CPP11 */
TAO::Any_Dual_Impl_T<T> *replacement = 0;
ACE_NEW_RETURN (replacement,
TAO::Any_Dual_Impl_T<T> (destructor,
@@ -170,11 +166,7 @@ TAO::Any_Dual_Impl_T<T>::replace (TAO_InputCDR &cdr,
empty_value),
false);
-#if defined (ACE_HAS_CPP11)
std::unique_ptr<TAO::Any_Dual_Impl_T<T> > replacement_safety (replacement);
-#else
- auto_ptr<TAO::Any_Dual_Impl_T<T> > replacement_safety (replacement);
-#endif /* ACE_HAS_CPP11 */
CORBA::Boolean const good_decode = replacement->demarshal_value (cdr);
diff --git a/TAO/tao/AnyTypeCode/Any_Impl.h b/TAO/tao/AnyTypeCode/Any_Impl.h
index c5682d07878..622ade7405c 100644
--- a/TAO/tao/AnyTypeCode/Any_Impl.h
+++ b/TAO/tao/AnyTypeCode/Any_Impl.h
@@ -22,15 +22,7 @@
#include "tao/AnyTypeCode/TAO_AnyTypeCode_Export.h"
#include "tao/Basic_Types.h"
-
-#if defined (ACE_HAS_CPP11)
-# include <atomic>
-#else
-# include "ace/Synch_Traits.h"
-# include "ace/Null_Mutex.h"
-# include "ace/Thread_Mutex.h"
-# include "ace/Atomic_Op.h"
-#endif /* ACE_HAS_CPP11 */
+#include <atomic>
TAO_BEGIN_VERSIONED_NAMESPACE_DECL
@@ -104,11 +96,7 @@ namespace TAO
private:
/// Reference counter.
-#if defined (ACE_HAS_CPP11)
std::atomic<uint32_t> refcount_;
-#else
- ACE_Atomic_Op<TAO_SYNCH_MUTEX, unsigned long> refcount_;
-#endif /* ACE_HAS_CPP11 */
};
}
diff --git a/TAO/tao/AnyTypeCode/Any_Impl_T.cpp b/TAO/tao/AnyTypeCode/Any_Impl_T.cpp
index f389796bff3..c0ba6c2d82b 100644
--- a/TAO/tao/AnyTypeCode/Any_Impl_T.cpp
+++ b/TAO/tao/AnyTypeCode/Any_Impl_T.cpp
@@ -91,11 +91,7 @@ TAO::Any_Impl_T<T>::extract (const CORBA::Any & any,
0),
false);
-#if defined (ACE_HAS_CPP11)
std::unique_ptr<TAO::Any_Impl_T<T> > replacement_safety (replacement);
-#else
- auto_ptr<TAO::Any_Impl_T<T> > replacement_safety (replacement);
-#endif /* ACE_HAS_CPP11 */
// We know this will work since the unencoded case is covered above.
TAO::Unknown_IDL_Type * const unk =
diff --git a/TAO/tao/AnyTypeCode/Any_Special_Impl_T.cpp b/TAO/tao/AnyTypeCode/Any_Special_Impl_T.cpp
index a5cdeb3239d..b728b74f42c 100644
--- a/TAO/tao/AnyTypeCode/Any_Special_Impl_T.cpp
+++ b/TAO/tao/AnyTypeCode/Any_Special_Impl_T.cpp
@@ -129,11 +129,7 @@ TAO::Any_Special_Impl_T<T, from_T, to_T>::extract (const CORBA::Any & any,
bound),
false);
-#if defined (ACE_HAS_CPP11)
std::unique_ptr<TAO::Any_Special_Impl_T<T, from_T, to_T> > replacement_safety (replacement);
-#else
- auto_ptr<TAO::Any_Special_Impl_T<T, from_T, to_T> > replacement_safety (replacement);
-#endif /* ACE_HAS_CPP11 */
// We know this will work since the unencoded case is covered above.
TAO::Unknown_IDL_Type * const unk =
diff --git a/TAO/tao/AnyTypeCode/Any_SystemException.cpp b/TAO/tao/AnyTypeCode/Any_SystemException.cpp
index 056e90d9531..1e905894b64 100644
--- a/TAO/tao/AnyTypeCode/Any_SystemException.cpp
+++ b/TAO/tao/AnyTypeCode/Any_SystemException.cpp
@@ -116,11 +116,7 @@ TAO::Any_SystemException::extract (const CORBA::Any & any,
empty_value),
false);
-#if defined (ACE_HAS_CPP11)
std::unique_ptr<TAO::Any_SystemException > replacement_safety (replacement);
-#else
- auto_ptr<TAO::Any_SystemException > replacement_safety (replacement);
-#endif /* ACE_HAS_CPP11 */
// We know this will work since the unencoded case is covered above.
TAO::Unknown_IDL_Type * const unk =
diff --git a/TAO/tao/AnyTypeCode/NVList.cpp b/TAO/tao/AnyTypeCode/NVList.cpp
index 61f86f31d40..7c0571e618f 100644
--- a/TAO/tao/AnyTypeCode/NVList.cpp
+++ b/TAO/tao/AnyTypeCode/NVList.cpp
@@ -432,11 +432,7 @@ CORBA::NVList::evaluate ()
if (this->incoming_ != 0)
{
-#if defined (ACE_HAS_CPP11)
std::unique_ptr<TAO_InputCDR> incoming (this->incoming_);
-#else
- auto_ptr<TAO_InputCDR> incoming (this->incoming_);
-#endif /* ACE_HAS_CPP11 */
this->incoming_ = 0;
this->_tao_decode (*(incoming.get ()), this->incoming_flag_);
diff --git a/TAO/tao/AnyTypeCode/NVList.h b/TAO/tao/AnyTypeCode/NVList.h
index 0516647be45..989df82cd99 100644
--- a/TAO/tao/AnyTypeCode/NVList.h
+++ b/TAO/tao/AnyTypeCode/NVList.h
@@ -26,11 +26,7 @@
#include "ace/Unbounded_Queue.h"
#include "ace/Thread_Mutex.h"
-#if defined (ACE_HAS_CPP11)
-# include <atomic>
-#else
-# include "ace/Atomic_Op.h"
-#endif /* ACE_HAS_CPP11 */
+#include <atomic>
TAO_BEGIN_VERSIONED_NAMESPACE_DECL
@@ -120,11 +116,7 @@ namespace CORBA
private:
/// Reference counter.
-#if defined (ACE_HAS_CPP11)
std::atomic<uint32_t> refcount_;
-#else
- ACE_Atomic_Op<TAO_SYNCH_MUTEX, unsigned long> refcount_;
-#endif /* ACE_HAS_CPP11 */
/// holds the value
Any any_;
@@ -266,11 +258,7 @@ namespace CORBA
ULong max_;
/// Reference counter.
-#if defined (ACE_HAS_CPP11)
std::atomic<uint32_t> refcount_;
-#else
- ACE_Atomic_Op<TAO_SYNCH_MUTEX, unsigned long> refcount_;
-#endif /* ACE_HAS_CPP11 */
/// Protects the incoming pointer.
TAO_SYNCH_MUTEX lock_;
diff --git a/TAO/tao/AnyTypeCode/True_RefCount_Policy.h b/TAO/tao/AnyTypeCode/True_RefCount_Policy.h
index d21e261cf3d..257032630fc 100644
--- a/TAO/tao/AnyTypeCode/True_RefCount_Policy.h
+++ b/TAO/tao/AnyTypeCode/True_RefCount_Policy.h
@@ -25,11 +25,7 @@
#include "tao/orbconf.h"
#include "ace/Thread_Mutex.h"
-#if defined (ACE_HAS_CPP11)
-# include <atomic>
-#else
-# include "ace/Atomic_Op.h"
-#endif /* ACE_HAS_CPP11 */
+#include <atomic>
TAO_BEGIN_VERSIONED_NAMESPACE_DECL
@@ -104,11 +100,7 @@ namespace TAO
private:
/// Reference counter.
-#if defined (ACE_HAS_CPP11)
std::atomic<uint32_t> refcount_;
-#else
- ACE_Atomic_Op<TAO_SYNCH_MUTEX, unsigned long> refcount_;
-#endif /* ACE_HAS_CPP11 */
};
} // End namespace TAO
diff --git a/TAO/tao/CDR.h b/TAO/tao/CDR.h
index 16d1d0eaa83..1b1168c5cf2 100644
--- a/TAO/tao/CDR.h
+++ b/TAO/tao/CDR.h
@@ -409,9 +409,7 @@ public:
TAO_InputCDR (ACE_InputCDR::Transfer_Contents rhs,
TAO_ORB_Core* orb_core = 0);
-#if defined (ACE_HAS_CPP11)
TAO_InputCDR& operator= (const TAO_InputCDR&) = default;
-#endif /* ACE_HAS_CPP11 */
/// Destructor
virtual ~TAO_InputCDR ();
diff --git a/TAO/tao/CDR.inl b/TAO/tao/CDR.inl
index c4fb156fcc5..08d0efeae3e 100644
--- a/TAO/tao/CDR.inl
+++ b/TAO/tao/CDR.inl
@@ -454,14 +454,10 @@ ACE_INLINE CORBA::Boolean operator<< (TAO_OutputCDR &os,
ACE_INLINE CORBA::Boolean operator<< (TAO_OutputCDR &os,
const std::string &x)
{
-#if defined (ACE_HAS_CPP11)
return
os.fragment_stream (ACE_CDR::OCTET_ALIGN,
sizeof (char))
&& static_cast<ACE_OutputCDR &> (os) << x;
-#else
- return os << x.c_str ();
-#endif
}
ACE_INLINE CORBA::Boolean operator<< (TAO_OutputCDR &os,
@@ -479,16 +475,12 @@ ACE_INLINE CORBA::Boolean operator<< (TAO_OutputCDR &os,
ACE_INLINE CORBA::Boolean operator<< (TAO_OutputCDR &os,
const std::wstring &x)
{
-#if defined (ACE_HAS_CPP11)
return
os.fragment_stream ((sizeof (CORBA::WChar) == 2
? ACE_CDR::SHORT_ALIGN
: ACE_CDR::LONG_ALIGN),
sizeof (CORBA::WChar))
&& static_cast<ACE_OutputCDR &> (os) << x;
-#else
- return os << x.c_str ();
-#endif
}
ACE_INLINE CORBA::Boolean operator<< (TAO_OutputCDR &os,
diff --git a/TAO/tao/Codeset/UTF16_BOM_Translator.cpp b/TAO/tao/Codeset/UTF16_BOM_Translator.cpp
index 0d0169cdd11..db3df08c895 100644
--- a/TAO/tao/Codeset/UTF16_BOM_Translator.cpp
+++ b/TAO/tao/Codeset/UTF16_BOM_Translator.cpp
@@ -170,7 +170,6 @@ ACE_CDR::Boolean
TAO_UTF16_BOM_Translator::read_wstring (ACE_InputCDR &cdr,
std::wstring &x)
{
-#if defined (ACE_HAS_CPP11)
ACE_CDR::ULong len;
if (!this->read_4 (cdr, &len))
return false;
@@ -227,9 +226,6 @@ TAO_UTF16_BOM_Translator::read_wstring (ACE_InputCDR &cdr,
}
x.clear ();
return false;
-#else
- return this->ACE_WChar_Codeset_Translator::read_wstring (cdr, x);
-#endif
}
#endif
diff --git a/TAO/tao/Codeset/UTF8_Latin1_Translator.cpp b/TAO/tao/Codeset/UTF8_Latin1_Translator.cpp
index 6da6df8f67a..44f03eb740c 100644
--- a/TAO/tao/Codeset/UTF8_Latin1_Translator.cpp
+++ b/TAO/tao/Codeset/UTF8_Latin1_Translator.cpp
@@ -121,7 +121,6 @@ ACE_CDR::Boolean
TAO_UTF8_Latin1_Translator::read_string (ACE_InputCDR &cdr,
std::string &x)
{
-#if defined (ACE_HAS_CPP11)
ACE_CDR::ULong len;
if (!cdr.read_ulong (len))
return false;
@@ -161,9 +160,6 @@ TAO_UTF8_Latin1_Translator::read_string (ACE_InputCDR &cdr,
x.clear ();
return false;
-#else
- return this->ACE_Char_Codeset_Translator::read_string (cdr, x);
-#endif
}
ACE_CDR::Boolean
diff --git a/TAO/tao/Connector_Registry.cpp b/TAO/tao/Connector_Registry.cpp
index d093150da0f..6de1485a595 100644
--- a/TAO/tao/Connector_Registry.cpp
+++ b/TAO/tao/Connector_Registry.cpp
@@ -64,11 +64,7 @@ TAO_Connector_Registry::open (TAO_ORB_Core *orb_core)
factory != end;
++factory)
{
-#if defined (ACE_HAS_CPP11)
std::unique_ptr <TAO_Connector> connector ((*factory)->factory ()->make_connector ());
-#else
- auto_ptr <TAO_Connector> connector ((*factory)->factory ()->make_connector ());
-#endif /* ACE_HAS_CPP11 */
if (connector.get ())
{
diff --git a/TAO/tao/DynamicInterface/AMH_DSI_Response_Handler.cpp b/TAO/tao/DynamicInterface/AMH_DSI_Response_Handler.cpp
index bd5ebe7efa6..52bf4e2517a 100644
--- a/TAO/tao/DynamicInterface/AMH_DSI_Response_Handler.cpp
+++ b/TAO/tao/DynamicInterface/AMH_DSI_Response_Handler.cpp
@@ -302,11 +302,7 @@ TAO_AMH_DSI_Exception_Holder::_tao_unmarshal (
void
TAO_AMH_DSI_Exception_Holder::raise_invoke ()
{
-#if defined (ACE_HAS_CPP11)
std::unique_ptr< ::CORBA::Exception> safety (this->exception_);
-#else
- auto_ptr< ::CORBA::Exception> safety (this->exception_);
-#endif /* ACE_HAS_CPP11 */
this->exception_->_raise ();
}
diff --git a/TAO/tao/DynamicInterface/Context.h b/TAO/tao/DynamicInterface/Context.h
index 4076983b754..dd9eb9cfc5a 100644
--- a/TAO/tao/DynamicInterface/Context.h
+++ b/TAO/tao/DynamicInterface/Context.h
@@ -31,11 +31,7 @@
#include "tao/default_environment.h"
#include "ace/Unbounded_Queue.h"
-#if defined (ACE_HAS_CPP11)
-# include <atomic>
-#else
-# include "ace/Atomic_Op.h"
-#endif /* ACE_HAS_CPP11 */
+#include <atomic>
TAO_BEGIN_VERSIONED_NAMESPACE_DECL
@@ -113,11 +109,7 @@ namespace CORBA
private:
/// Reference counter.
-#if defined (ACE_HAS_CPP11)
std::atomic<uint32_t> refcount_;
-#else
- ACE_Atomic_Op<TAO_SYNCH_MUTEX, unsigned long> refcount_;
-#endif /* ACE_HAS_CPP11 */
};
/**
@@ -182,11 +174,7 @@ namespace CORBA
ContextList &operator= (const ContextList &);
/// Reference counter.
-#if defined (ACE_HAS_CPP11)
std::atomic<uint32_t> refcount_;
-#else
- ACE_Atomic_Op<TAO_SYNCH_MUTEX, unsigned long> refcount_;
-#endif /* ACE_HAS_CPP11 */
/// Internal list of typecodes.
ACE_Unbounded_Queue<char *> ctx_list_;
diff --git a/TAO/tao/DynamicInterface/ExceptionList.h b/TAO/tao/DynamicInterface/ExceptionList.h
index db7200985ed..a59a7b059eb 100644
--- a/TAO/tao/DynamicInterface/ExceptionList.h
+++ b/TAO/tao/DynamicInterface/ExceptionList.h
@@ -30,11 +30,7 @@
#include "tao/Pseudo_VarOut_T.h"
#include "ace/Unbounded_Queue.h"
-#if defined (ACE_HAS_CPP11)
-# include <atomic>
-#else
-# include "ace/Atomic_Op.h"
-#endif /* ACE_HAS_CPP11 */
+#include <atomic>
TAO_BEGIN_VERSIONED_NAMESPACE_DECL
@@ -106,11 +102,7 @@ namespace CORBA
ExceptionList &operator= (const ExceptionList &);
/// Reference counter.
-#if defined (ACE_HAS_CPP11)
std::atomic<uint32_t> refcount_;
-#else
- ACE_Atomic_Op<TAO_SYNCH_MUTEX, CORBA::ULong> refcount_;
-#endif /* ACE_HAS_CPP11 */
/// Internal list of typecodes.
ACE_Unbounded_Queue<CORBA::TypeCode_ptr> tc_list_;
diff --git a/TAO/tao/DynamicInterface/Request.h b/TAO/tao/DynamicInterface/Request.h
index 6613188666b..19054aa74c2 100644
--- a/TAO/tao/DynamicInterface/Request.h
+++ b/TAO/tao/DynamicInterface/Request.h
@@ -40,11 +40,7 @@
#endif /* TAO_HAS_AMI */
#include "ace/SString.h"
-#if defined (ACE_HAS_CPP11)
-# include <atomic>
-#else
-# include "ace/Atomic_Op.h"
-#endif /* ACE_HAS_CPP11 */
+#include <atomic>
TAO_BEGIN_VERSIONED_NAMESPACE_DECL
@@ -248,11 +244,7 @@ namespace CORBA
CORBA::Context_ptr ctx_;
/// Reference counting.
-#if defined (ACE_HAS_CPP11)
std::atomic<uint32_t> refcount_;
-#else
- ACE_Atomic_Op<TAO_SYNCH_MUTEX, unsigned long> refcount_;
-#endif /* ACE_HAS_CPP11 */
/// Protect the response_received_.
TAO_SYNCH_MUTEX lock_;
diff --git a/TAO/tao/DynamicInterface/Server_Request.h b/TAO/tao/DynamicInterface/Server_Request.h
index 555e1c4f8f7..8532a92c237 100644
--- a/TAO/tao/DynamicInterface/Server_Request.h
+++ b/TAO/tao/DynamicInterface/Server_Request.h
@@ -29,11 +29,7 @@
#include "tao/TAO_Server_Request.h"
#include "tao/CDR.h"
-#if defined (ACE_HAS_CPP11)
-# include <atomic>
-#else
-# include "ace/Atomic_Op.h"
-#endif /* ACE_HAS_CPP11 */
+#include <atomic>
TAO_BEGIN_VERSIONED_NAMESPACE_DECL
@@ -150,11 +146,7 @@ namespace CORBA
CORBA::Any_ptr exception_;
/// Reference counting.
-#if defined (ACE_HAS_CPP11)
std::atomic<uint32_t> refcount_;
-#else
- ACE_Atomic_Op<TAO_SYNCH_MUTEX, unsigned long> refcount_;
-#endif /* ACE_HAS_CPP11 */
/// Request from the ORB.
TAO_ServerRequest &orb_server_request_;
diff --git a/TAO/tao/Dynamic_TP/DTP_Task.cpp b/TAO/tao/Dynamic_TP/DTP_Task.cpp
index 5dac916eede..80a3bbd2dd2 100644
--- a/TAO/tao/Dynamic_TP/DTP_Task.cpp
+++ b/TAO/tao/Dynamic_TP/DTP_Task.cpp
@@ -345,7 +345,7 @@ TAO_DTP_Task::svc (void)
ACE_TEXT ("TAO (%P|%t) - DTP_Task::svc() ")
ACE_TEXT ("Decrementing busy_threads_. ")
ACE_TEXT ("Busy thread count:%d\n"),
- this->busy_threads_.value()));
+ this->busy_threads_.load()));
}
ACE_Time_Value tmp_sec = this->thread_idle_time_.to_absolute_time();
@@ -385,7 +385,7 @@ TAO_DTP_Task::svc (void)
ACE_TEXT ("TAO (%P|%t) - DTP_Task::svc() ")
ACE_TEXT ("Incrementing busy_threads_. ")
ACE_TEXT ("Busy thread count:%d\n"),
- this->busy_threads_.value ()));
+ this->busy_threads_.load ()));
}
}
}
diff --git a/TAO/tao/Dynamic_TP/DTP_Task.h b/TAO/tao/Dynamic_TP/DTP_Task.h
index 73dfeff8651..c39e3b57772 100644
--- a/TAO/tao/Dynamic_TP/DTP_Task.h
+++ b/TAO/tao/Dynamic_TP/DTP_Task.h
@@ -31,6 +31,7 @@
#include "ace/Synch.h"
#include "ace/Containers_T.h"
#include "ace/Vector_T.h"
+#include <atomic>
TAO_BEGIN_VERSIONED_NAMESPACE_DECL
@@ -177,7 +178,7 @@ private:
size_t num_queue_requests_;
/// The number of currently active worker threads.
- ACE_Atomic_Op <TAO_SYNCH_MUTEX, unsigned long> busy_threads_;
+ std::atomic<unsigned long> busy_threads_;
/// The queue of pending servant requests (a.k.a. the "request queue").
TAO::CSD::TP_Queue queue_;
diff --git a/TAO/tao/Dynamic_TP/DTP_Thread_Pool.cpp b/TAO/tao/Dynamic_TP/DTP_Thread_Pool.cpp
index a51873958c1..bfc7bcc1a0d 100644
--- a/TAO/tao/Dynamic_TP/DTP_Thread_Pool.cpp
+++ b/TAO/tao/Dynamic_TP/DTP_Thread_Pool.cpp
@@ -519,11 +519,7 @@ CORBA::ULong
TAO_DTP_Thread_Pool_Manager::create_threadpool_helper (TAO_DTP_Thread_Pool *thread_pool)
{
// Make sure of safe deletion in case of errors.
-#if defined (ACE_HAS_CPP11)
std::unique_ptr<TAO_DTP_Thread_Pool> safe_thread_pool (thread_pool);
-#else
- auto_ptr<TAO_DTP_Thread_Pool> safe_thread_pool (thread_pool);
-#endif /* ACE_HAS_CPP11 */
// Open the pool.
thread_pool->open ();
diff --git a/TAO/tao/IORManipulation/IORManipulation.cpp b/TAO/tao/IORManipulation/IORManipulation.cpp
index 37b5284328f..8eac641e59e 100644
--- a/TAO/tao/IORManipulation/IORManipulation.cpp
+++ b/TAO/tao/IORManipulation/IORManipulation.cpp
@@ -46,11 +46,7 @@ TAO_IOR_Manipulation_impl::merge_iors (
// get the profile lists, start by initialize the composite reference
// by using the first Object. Then for each subsequent Object verify
// they are the same type and they do not have duplicate profiles.
-#if defined (ACE_HAS_CPP11)
std::unique_ptr<TAO_MProfile> tmp_pfiles (iors[0]->_stubobj ()->make_profiles ());
-#else
- auto_ptr<TAO_MProfile> tmp_pfiles (iors[0]->_stubobj ()->make_profiles ());
-#endif /* ACE_HAS_CPP11 */
if (Merged_Profiles.add_profiles (tmp_pfiles.get ())< 0)
throw TAO_IOP::Invalid_IOR ();
CORBA::String_var id =
@@ -145,11 +141,7 @@ TAO_IOR_Manipulation_impl::remove_profiles (
// initialize with estimated pfile count.
TAO_MProfile Diff_Profiles (count);
-#if defined (ACE_HAS_CPP11)
std::unique_ptr<TAO_MProfile> tmp_pfiles (group->_stubobj ()->make_profiles ());
-#else
- auto_ptr<TAO_MProfile> tmp_pfiles (group->_stubobj ()->make_profiles ());
-#endif /* ACE_HAS_CPP11 */
if (Diff_Profiles.add_profiles (tmp_pfiles.get ()) < 0)
throw TAO_IOP::Invalid_IOR ();
@@ -277,13 +269,8 @@ TAO_IOR_Manipulation_impl::is_in_ior (
CORBA::ULong count = 0;
TAO_Profile *pfile1 = 0;
TAO_Profile *pfile2 = 0;
-#if defined (ACE_HAS_CPP11)
std::unique_ptr<TAO_MProfile> tmp_pfiles1 (ior1->_stubobj ()->make_profiles ());
std::unique_ptr<TAO_MProfile> tmp_pfiles2 (ior2->_stubobj ()->make_profiles ());
-#else
- auto_ptr<TAO_MProfile> tmp_pfiles1 (ior1->_stubobj ()->make_profiles ());
- auto_ptr<TAO_MProfile> tmp_pfiles2 (ior2->_stubobj ()->make_profiles ());
-#endif /* ACE_HAS_CPP11 */
tmp_pfiles1->rewind ();
while ((pfile1 = tmp_pfiles1->get_next ()) != 0)
diff --git a/TAO/tao/Intrusive_Ref_Count_Base_T.h b/TAO/tao/Intrusive_Ref_Count_Base_T.h
index 26092e3a8e0..69108c9836f 100644
--- a/TAO/tao/Intrusive_Ref_Count_Base_T.h
+++ b/TAO/tao/Intrusive_Ref_Count_Base_T.h
@@ -20,12 +20,7 @@
#include /**/ "tao/Versioned_Namespace.h"
#include "tao/Basic_Types.h"
-
-#if defined (ACE_HAS_CPP11)
-# include <atomic>
-#else
-# include "ace/Atomic_Op.h"
-#endif /* ACE_HAS_CPP11 */
+#include <atomic>
TAO_BEGIN_VERSIONED_NAMESPACE_DECL
@@ -52,11 +47,7 @@ protected:
TAO_Intrusive_Ref_Count_Base ();
private:
-#if defined (ACE_HAS_CPP11)
std::atomic<uint32_t> refcount_;
-#else
- ACE_Atomic_Op<ACE_LOCK, unsigned long> refcount_;
-#endif /* ACE_HAS_CPP11 */
// Prevent copying/assignment.
TAO_Intrusive_Ref_Count_Base (const TAO_Intrusive_Ref_Count_Base&);
diff --git a/TAO/tao/Load_Protocol_Factory_T.h b/TAO/tao/Load_Protocol_Factory_T.h
index 29a2519aa05..af0c7f18731 100644
--- a/TAO/tao/Load_Protocol_Factory_T.h
+++ b/TAO/tao/Load_Protocol_Factory_T.h
@@ -33,11 +33,7 @@ namespace TAO
const char *name)
{
TAO_Protocol_Factory *protocol_factory = 0;
-#if defined (ACE_HAS_CPP11)
std::unique_ptr<TAO_Protocol_Factory> safe_protocol_factory;
-#else
- auto_ptr<TAO_Protocol_Factory> safe_protocol_factory;
-#endif /* ACE_HAS_CPP11 */
TAO_Protocol_Item *item = 0;
diff --git a/TAO/tao/ORB.h b/TAO/tao/ORB.h
index f9645906948..81e5633180d 100644
--- a/TAO/tao/ORB.h
+++ b/TAO/tao/ORB.h
@@ -35,11 +35,7 @@
#include "ace/Thread_Mutex.h"
#include "ace/Guard_T.h"
-#if defined (ACE_HAS_CPP11)
-# include <atomic>
-#else
-# include "ace/Atomic_Op.h"
-#endif /* ACE_HAS_CPP11 */
+#include <atomic>
TAO_BEGIN_VERSIONED_NAMESPACE_DECL
@@ -576,11 +572,7 @@ namespace CORBA
private:
/// Maintains a reference count of number of instantiations of the
/// ORB.
-#if defined (ACE_HAS_CPP11)
std::atomic<uint32_t> refcount_;
-#else
- ACE_Atomic_Op<TAO_SYNCH_MUTEX, unsigned long> refcount_;
-#endif /* ACE_HAS_CPP11 */
/// The ORB_Core that created us....
TAO_ORB_Core * orb_core_;
diff --git a/TAO/tao/ORB.inl b/TAO/tao/ORB.inl
index b46a2f83819..1043a54de32 100644
--- a/TAO/tao/ORB.inl
+++ b/TAO/tao/ORB.inl
@@ -26,11 +26,7 @@ CORBA::ORB::_incr_refcount (void)
ACE_INLINE unsigned long
CORBA::ORB::_refcount (void) const
{
-#if defined (ACE_HAS_CPP11)
return this->refcount_;
-#else
- return this->refcount_.value ();
-#endif /* ACE_HAS_CPP11 */
}
ACE_INLINE unsigned long
diff --git a/TAO/tao/ORB_Core.cpp b/TAO/tao/ORB_Core.cpp
index ac09508d440..cb2d45bff86 100644
--- a/TAO/tao/ORB_Core.cpp
+++ b/TAO/tao/ORB_Core.cpp
@@ -1966,11 +1966,7 @@ TAO_ORB_Core::root_poa ()
if (CORBA::is_nil (this->root_poa_.in ()))
{
-#if defined (ACE_HAS_CPP11)
std::unique_ptr<TAO_Adapter> poa_adapter (factory->create (this));
-#else
- auto_ptr<TAO_Adapter> poa_adapter (factory->create (this));
-#endif /* ACE_HAS_CPP11 */
poa_adapter->open ();
// @@ Not exception safe
diff --git a/TAO/tao/ORB_Core.h b/TAO/tao/ORB_Core.h
index c7a11210b3c..35b2b599763 100644
--- a/TAO/tao/ORB_Core.h
+++ b/TAO/tao/ORB_Core.h
@@ -41,11 +41,7 @@
#include "ace/Lock_Adapter_T.h"
#include "ace/TSS_T.h"
#include "ace/Service_Config.h"
-#if defined (ACE_HAS_CPP11)
-# include <atomic>
-#else
-# include "ace/Atomic_Op.h"
-#endif /* ACE_HAS_CPP11 */
+#include <atomic>
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
class ACE_Data_Block;
@@ -1211,11 +1207,7 @@ protected:
#endif /* TAO_HAS_BUFFERING_CONSTRAINT_POLICY == 1 */
/// Number of outstanding references to this object.
-#if defined (ACE_HAS_CPP11)
std::atomic<uint32_t> refcount_;
-#else
- ACE_Atomic_Op<TAO_SYNCH_MUTEX, unsigned long> refcount_;
-#endif /* ACE_HAS_CPP11 */
/// Registry containing all registered policy factories.
TAO::PolicyFactory_Registry_Adapter *policy_factory_registry_;
diff --git a/TAO/tao/ORB_Core.inl b/TAO/tao/ORB_Core.inl
index f68d3beef3d..f6ebac0549d 100644
--- a/TAO/tao/ORB_Core.inl
+++ b/TAO/tao/ORB_Core.inl
@@ -19,11 +19,7 @@ TAO_ORB_Core::_incr_refcnt (void)
ACE_INLINE unsigned long
TAO_ORB_Core::_refcnt (void) const
{
-#if defined (ACE_HAS_CPP11)
return this->refcount_;
-#else
- return this->refcount_.value ();
-#endif /* ACE_HAS_CPP11 */
}
ACE_INLINE unsigned long
diff --git a/TAO/tao/Object.cpp b/TAO/tao/Object.cpp
index d89c8df39e3..f1be9002e7d 100644
--- a/TAO/tao/Object.cpp
+++ b/TAO/tao/Object.cpp
@@ -110,11 +110,7 @@ CORBA::Object::_remove_ref ()
CORBA::ULong
CORBA::Object::_refcount_value() const
{
-#if defined (ACE_HAS_CPP11)
return this->refcount_;
-#else
- return this->refcount_.value ();
-#endif /* ACE_HAS_CPP11 */
}
void
diff --git a/TAO/tao/Object.h b/TAO/tao/Object.h
index 8f2cb4239da..c7f9752374f 100644
--- a/TAO/tao/Object.h
+++ b/TAO/tao/Object.h
@@ -30,11 +30,7 @@
#include "tao/Object_Argument_T.h"
#include "tao/Arg_Traits_T.h"
#include "tao/Any_Insert_Policy_T.h"
-#if defined (ACE_HAS_CPP11)
-# include <atomic>
-#else
-# include "ace/Atomic_Op.h"
-#endif /* ACE_HAS_CPP11 */
+#include <atomic>
#if defined (HPUX) && defined (IOR)
/* HP-UX 11.11 defines IOR in /usr/include/pa/inline.h
diff --git a/TAO/tao/Object_KeyC.h b/TAO/tao/Object_KeyC.h
index f0f60ee07bb..3ad8a251c09 100644
--- a/TAO/tao/Object_KeyC.h
+++ b/TAO/tao/Object_KeyC.h
@@ -92,12 +92,10 @@ namespace TAO
CORBA::Octet* buffer,
CORBA::Boolean release = false
);
-#if defined (ACE_HAS_CPP11)
ObjectKey (const ObjectKey &) = default;
ObjectKey (ObjectKey &&) = default;
ObjectKey& operator= (const ObjectKey &) = default;
ObjectKey& operator= (ObjectKey &&) = default;
-#endif /* ACE_HAS_CPP11 */
~ObjectKey ();
typedef ObjectKey_var _var_type;
diff --git a/TAO/tao/PortableServer/Active_Object_Map.cpp b/TAO/tao/PortableServer/Active_Object_Map.cpp
index b556fa72579..bd30f17ad50 100644
--- a/TAO/tao/PortableServer/Active_Object_Map.cpp
+++ b/TAO/tao/PortableServer/Active_Object_Map.cpp
@@ -116,11 +116,7 @@ TAO_Active_Object_Map::TAO_Active_Object_Map (
}
// Give ownership to the auto pointer.
-#if defined (ACE_HAS_CPP11)
std::unique_ptr<TAO_Id_Uniqueness_Strategy> new_id_uniqueness_strategy (id_uniqueness_strategy);
-#else
- auto_ptr<TAO_Id_Uniqueness_Strategy> new_id_uniqueness_strategy (id_uniqueness_strategy);
-#endif /* ACE_HAS_CPP11 */
TAO_Lifespan_Strategy *lifespan_strategy = 0;
@@ -144,11 +140,7 @@ TAO_Active_Object_Map::TAO_Active_Object_Map (
}
// Give ownership to the auto pointer.
-#if defined (ACE_HAS_CPP11)
std::unique_ptr<TAO_Lifespan_Strategy> new_lifespan_strategy (lifespan_strategy);
-#else
- auto_ptr<TAO_Lifespan_Strategy> new_lifespan_strategy (lifespan_strategy);
-#endif /* ACE_HAS_CPP11 */
TAO_Id_Assignment_Strategy *id_assignment_strategy = 0;
@@ -183,11 +175,7 @@ TAO_Active_Object_Map::TAO_Active_Object_Map (
}
// Give ownership to the auto pointer.
-#if defined (ACE_HAS_CPP11)
std::unique_ptr<TAO_Id_Assignment_Strategy> new_id_assignment_strategy (id_assignment_strategy);
-#else
- auto_ptr<TAO_Id_Assignment_Strategy> new_id_assignment_strategy (id_assignment_strategy);
-#endif /* ACE_HAS_CPP11 */
TAO_Id_Hint_Strategy *id_hint_strategy = 0;
if ((user_id_policy
@@ -209,11 +197,7 @@ TAO_Active_Object_Map::TAO_Active_Object_Map (
}
// Give ownership to the auto pointer.
-#if defined (ACE_HAS_CPP11)
std::unique_ptr<TAO_Id_Hint_Strategy> new_id_hint_strategy (id_hint_strategy);
-#else
- auto_ptr<TAO_Id_Hint_Strategy> new_id_hint_strategy (id_hint_strategy);
-#endif /* ACE_HAS_CPP11 */
servant_map *sm = 0;
if (unique_id_policy)
@@ -247,11 +231,7 @@ TAO_Active_Object_Map::TAO_Active_Object_Map (
}
// Give ownership to the auto pointer.
-#if defined (ACE_HAS_CPP11)
std::unique_ptr<servant_map> new_servant_map (sm);
-#else
- auto_ptr<servant_map> new_servant_map (sm);
-#endif /* ACE_HAS_CPP11 */
user_id_map *uim = 0;
if (user_id_policy
@@ -321,11 +301,7 @@ TAO_Active_Object_Map::TAO_Active_Object_Map (
}
// Give ownership to the auto pointer.
-#if defined (ACE_HAS_CPP11)
std::unique_ptr<user_id_map> new_user_id_map (uim);
-#else
- auto_ptr<user_id_map> new_user_id_map (uim);
-#endif /* ACE_HAS_CPP11 */
id_uniqueness_strategy->set_active_object_map (this);
lifespan_strategy->set_active_object_map (this);
@@ -333,21 +309,12 @@ TAO_Active_Object_Map::TAO_Active_Object_Map (
// Finally everything is fine. Make sure to take ownership away
// from the auto pointer.
-#if defined (ACE_HAS_CPP11)
this->id_uniqueness_strategy_ = std::move(new_id_uniqueness_strategy);
this->lifespan_strategy_ = std::move(new_lifespan_strategy);
this->id_assignment_strategy_ = std::move(new_id_assignment_strategy);
this->id_hint_strategy_ = std::move(new_id_hint_strategy);
this->servant_map_ = std::move(new_servant_map);
this->user_id_map_ = std::move(new_user_id_map);
-#else
- this->id_uniqueness_strategy_ = new_id_uniqueness_strategy;
- this->lifespan_strategy_ = new_lifespan_strategy;
- this->id_assignment_strategy_ = new_id_assignment_strategy;
- this->id_hint_strategy_ = new_id_hint_strategy;
- this->servant_map_ = new_servant_map;
- this->user_id_map_ = new_user_id_map;
-#endif /* ACE_HAS_CPP11 */
#if defined (TAO_HAS_MONITOR_POINTS) && (TAO_HAS_MONITOR_POINTS == 1)
ACE_NEW (this->monitor_,
diff --git a/TAO/tao/PortableServer/Active_Object_Map.h b/TAO/tao/PortableServer/Active_Object_Map.h
index c2107759a9a..d2b688d7dd6 100644
--- a/TAO/tao/PortableServer/Active_Object_Map.h
+++ b/TAO/tao/PortableServer/Active_Object_Map.h
@@ -237,46 +237,22 @@ public:
#endif /* TAO_HAS_MINIMUM_POA_MAPS == 0 */
/// Id map.
-#if defined (ACE_HAS_CPP11)
std::unique_ptr<user_id_map> user_id_map_;
-#else
- auto_ptr<user_id_map> user_id_map_;
-#endif /* ACE_HAS_CPP11 */
/// Servant map.
-#if defined (ACE_HAS_CPP11)
std::unique_ptr<servant_map> servant_map_;
-#else
- auto_ptr<servant_map> servant_map_;
-#endif /* ACE_HAS_CPP11 */
/// Id uniqueness strategy.
-#if defined (ACE_HAS_CPP11)
std::unique_ptr<TAO_Id_Uniqueness_Strategy> id_uniqueness_strategy_;
-#else
- auto_ptr<TAO_Id_Uniqueness_Strategy> id_uniqueness_strategy_;
-#endif /* ACE_HAS_CPP11 */
/// Lifespan strategy.
-#if defined (ACE_HAS_CPP11)
std::unique_ptr<TAO_Lifespan_Strategy> lifespan_strategy_;
-#else
- auto_ptr<TAO_Lifespan_Strategy> lifespan_strategy_;
-#endif /* ACE_HAS_CPP11 */
/// Id assignment strategy.
-#if defined (ACE_HAS_CPP11)
std::unique_ptr<TAO_Id_Assignment_Strategy> id_assignment_strategy_;
-#else
- auto_ptr<TAO_Id_Assignment_Strategy> id_assignment_strategy_;
-#endif /* ACE_HAS_CPP11 */
/// Id hint strategy.
-#if defined (ACE_HAS_CPP11)
std::unique_ptr<TAO_Id_Hint_Strategy> id_hint_strategy_;
-#else
- auto_ptr<TAO_Id_Hint_Strategy> id_hint_strategy_;
-#endif /* ACE_HAS_CPP11 */
/// Flag to see if we are using active maps in this active object
/// map.
diff --git a/TAO/tao/PortableServer/Object_Adapter.cpp b/TAO/tao/PortableServer/Object_Adapter.cpp
index b8cd2a2d059..bc65cf1fbc3 100644
--- a/TAO/tao/PortableServer/Object_Adapter.cpp
+++ b/TAO/tao/PortableServer/Object_Adapter.cpp
@@ -166,11 +166,7 @@ TAO_Object_Adapter::TAO_Object_Adapter (const TAO_Server_Strategy_Factory::Activ
No_Hint_Strategy);
// Give ownership to the auto pointer.
-#if defined (ACE_HAS_CPP11)
std::unique_ptr<Hint_Strategy> new_hint_strategy (hint_strategy);
-#else
- auto_ptr<Hint_Strategy> new_hint_strategy (hint_strategy);
-#endif /* ACE_HAS_CPP11 */
new_hint_strategy->object_adapter (this);
@@ -197,11 +193,7 @@ TAO_Object_Adapter::TAO_Object_Adapter (const TAO_Server_Strategy_Factory::Activ
break;
}
// Give ownership to the auto pointer.
-#if defined (ACE_HAS_CPP11)
std::unique_ptr<persistent_poa_name_map> new_persistent_poa_name_map (ppnm);
-#else
- auto_ptr<persistent_poa_name_map> new_persistent_poa_name_map (ppnm);
-#endif /* ACE_HAS_CPP11 */
transient_poa_map *tpm = 0;
switch (creation_parameters.poa_lookup_strategy_for_transient_id_policy_)
@@ -231,11 +223,7 @@ TAO_Object_Adapter::TAO_Object_Adapter (const TAO_Server_Strategy_Factory::Activ
break;
}
// Give ownership to the auto pointer.
-#if defined (ACE_HAS_CPP11)
std::unique_ptr<transient_poa_map> new_transient_poa_map (tpm);
-#else
- auto_ptr<transient_poa_map> new_transient_poa_map (tpm);
-#endif /* ACE_HAS_CPP11 */
this->hint_strategy_ = new_hint_strategy.release ();
this->persistent_poa_name_map_ = new_persistent_poa_name_map.release ();
diff --git a/TAO/tao/PortableServer/Root_POA.cpp b/TAO/tao/PortableServer/Root_POA.cpp
index fa97cf8d535..901ff5ca5a9 100644
--- a/TAO/tao/PortableServer/Root_POA.cpp
+++ b/TAO/tao/PortableServer/Root_POA.cpp
@@ -2027,11 +2027,7 @@ TAO_Root_POA::key_to_stub_i (const TAO::ObjectKey &key,
}
// Give ownership to the auto pointer.
-#if defined (ACE_HAS_CPP11)
std::unique_ptr<TAO_Acceptor_Filter> new_filter (filter);
-#else
- auto_ptr<TAO_Acceptor_Filter> new_filter (filter);
-#endif /* ACE_HAS_CPP11 */
TAO_Stub *data =
this->create_stub_object (
diff --git a/TAO/tao/PortableServer/ServantRetentionStrategyNonRetain.h b/TAO/tao/PortableServer/ServantRetentionStrategyNonRetain.h
index 49879c3a222..8d2e46f5336 100644
--- a/TAO/tao/PortableServer/ServantRetentionStrategyNonRetain.h
+++ b/TAO/tao/PortableServer/ServantRetentionStrategyNonRetain.h
@@ -19,7 +19,7 @@
#endif /* ACE_LACKS_PRAGMA_ONCE */
#include "tao/PortableServer/Servant_Location.h"
-#include "ace/Atomic_Op.h"
+#include <atomic>
TAO_BEGIN_VERSIONED_NAMESPACE_DECL
@@ -123,7 +123,7 @@ namespace TAO
protected:
TAO_Root_POA *poa_;
- ACE_Atomic_Op<TAO_SYNCH_MUTEX,ACE_UINT32> sys_id_count_;
+ std::atomic<uint32_t> sys_id_count_;
};
}
}
diff --git a/TAO/tao/PortableServer/ServantRetentionStrategyRetain.h b/TAO/tao/PortableServer/ServantRetentionStrategyRetain.h
index 46d47061731..a475bdb69ac 100644
--- a/TAO/tao/PortableServer/ServantRetentionStrategyRetain.h
+++ b/TAO/tao/PortableServer/ServantRetentionStrategyRetain.h
@@ -139,11 +139,7 @@ namespace TAO
TAO_Active_Object_Map * get_active_object_map() const;
private:
-#if defined (ACE_HAS_CPP11)
std::unique_ptr<TAO_Active_Object_Map> active_object_map_;
-#else
- auto_ptr<TAO_Active_Object_Map> active_object_map_;
-#endif /* ACE_HAS_CPP11 */
CORBA::ULong waiting_servant_deactivation_;
};
}
diff --git a/TAO/tao/PortableServer/Servant_Base.cpp b/TAO/tao/PortableServer/Servant_Base.cpp
index 8a9f6f3cb7b..531be3b10f4 100644
--- a/TAO/tao/PortableServer/Servant_Base.cpp
+++ b/TAO/tao/PortableServer/Servant_Base.cpp
@@ -664,11 +664,7 @@ TAO_ServantBase::_remove_ref ()
CORBA::ULong
TAO_ServantBase::_refcount_value () const
{
-#if defined (ACE_HAS_CPP11)
return this->ref_count_;
-#else
- return this->ref_count_.value ();
-#endif /* ACE_HAS_CPP11 */
}
void
diff --git a/TAO/tao/PortableServer/Servant_Base.h b/TAO/tao/PortableServer/Servant_Base.h
index 995b6eb0293..9b15c1c26bb 100644
--- a/TAO/tao/PortableServer/Servant_Base.h
+++ b/TAO/tao/PortableServer/Servant_Base.h
@@ -22,11 +22,7 @@
#include "tao/PortableServer/PS_ForwardC.h"
#include "tao/PortableServer/Servant_var.h"
#include "tao/Abstract_Servant_Base.h"
-#if defined (ACE_HAS_CPP11)
#include <atomic>
-#else
-#include "ace/Atomic_Op.h"
-#endif /* ACE_HAS_CPP11 */
TAO_BEGIN_VERSIONED_NAMESPACE_DECL
@@ -208,11 +204,7 @@ protected:
protected:
/// Reference counter.
-#if defined (ACE_HAS_CPP11)
std::atomic<uint32_t> ref_count_;
-#else
- ACE_Atomic_Op<TAO_SYNCH_MUTEX, unsigned long> ref_count_;
-#endif /* ACE_HAS_CPP11 */
/// The operation table for this servant. It is initialized by the
/// most derived class.
diff --git a/TAO/tao/Principal.h b/TAO/tao/Principal.h
index e961e8b419a..756aac6a9a6 100644
--- a/TAO/tao/Principal.h
+++ b/TAO/tao/Principal.h
@@ -25,11 +25,7 @@
#include "tao/OctetSeqC.h"
#include "tao/Pseudo_VarOut_T.h"
#include "ace/Thread_Mutex.h"
-#if defined (ACE_HAS_CPP11)
-# include <atomic>
-#else
-# include "ace/Atomic_Op.h"
-#endif /* ACE_HAS_CPP11 */
+#include <atomic>
TAO_BEGIN_VERSIONED_NAMESPACE_DECL
@@ -94,11 +90,7 @@ namespace CORBA
private:
/// Reference counter.
-#if defined (ACE_HAS_CPP11)
std::atomic<uint32_t> refcount_;
-#else
- ACE_Atomic_Op<TAO_SYNCH_MUTEX, unsigned long> refcount_;
-#endif /* ACE_HAS_CPP11 */
};
} // End CORBA namespace
diff --git a/TAO/tao/Profile.h b/TAO/tao/Profile.h
index fc2eee3bee7..8bb9ccdcdcc 100644
--- a/TAO/tao/Profile.h
+++ b/TAO/tao/Profile.h
@@ -22,11 +22,7 @@
#include "tao/GIOP_Message_Version.h"
#include "tao/Refcounted_ObjectKey.h"
#include "tao/Service_Callbacks.h"
-#if defined (ACE_HAS_CPP11)
-# include <atomic>
-#else
-# include "ace/Atomic_Op.h"
-#endif /* ACE_HAS_CPP11 */
+#include <atomic>
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
class ACE_Lock;
@@ -379,11 +375,7 @@ private:
TAO_MProfile* forward_to_;
/// Number of outstanding references to this object.
-#if defined (ACE_HAS_CPP11)
- std::atomic<uint32_t> refcount_;
-#else
- ACE_Atomic_Op<TAO_SYNCH_MUTEX, unsigned long> refcount_;
-#endif /* ACE_HAS_CPP11 */
+ std::atomic<uint32_t> refcount_;
/// A lock that protects creation of the tagged profile
TAO_SYNCH_MUTEX tagged_profile_lock_;
diff --git a/TAO/tao/RTCORBA/Thread_Pool.cpp b/TAO/tao/RTCORBA/Thread_Pool.cpp
index 622de35c11e..4648487aab2 100644
--- a/TAO/tao/RTCORBA/Thread_Pool.cpp
+++ b/TAO/tao/RTCORBA/Thread_Pool.cpp
@@ -890,11 +890,7 @@ RTCORBA::ThreadpoolId
TAO_Thread_Pool_Manager::create_threadpool_helper (TAO_Thread_Pool *thread_pool)
{
// Make sure of safe deletion in case of errors.
-#if defined (ACE_HAS_CPP11)
std::unique_ptr<TAO_Thread_Pool> safe_thread_pool (thread_pool);
-#else
- auto_ptr<TAO_Thread_Pool> safe_thread_pool (thread_pool);
-#endif /* ACE_HAS_CPP11 */
// Open the pool.
thread_pool->open ();
diff --git a/TAO/tao/RTScheduling/Current.cpp b/TAO/tao/RTScheduling/Current.cpp
index 53ea0dd8886..c8735b4bb16 100644
--- a/TAO/tao/RTScheduling/Current.cpp
+++ b/TAO/tao/RTScheduling/Current.cpp
@@ -11,7 +11,7 @@
TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-ACE_Atomic_Op<TAO_SYNCH_MUTEX, long> TAO_RTScheduler_Current::guid_counter;
+std::atomic<long> TAO_RTScheduler_Current::guid_counter;
u_long
TAO_DTId_Hash::operator () (const IdType &id) const
diff --git a/TAO/tao/RTScheduling/Current.h b/TAO/tao/RTScheduling/Current.h
index f941512b9de..4edf9c5ceb9 100644
--- a/TAO/tao/RTScheduling/Current.h
+++ b/TAO/tao/RTScheduling/Current.h
@@ -78,7 +78,7 @@ class TAO_RTScheduler_Export TAO_RTScheduler_Current
public ::CORBA::LocalObject
{
public:
- static ACE_Atomic_Op<TAO_SYNCH_MUTEX, long> guid_counter;
+ static std::atomic<long> guid_counter;
TAO_RTScheduler_Current (void);
virtual ~TAO_RTScheduler_Current (void);
diff --git a/TAO/tao/RTScheduling/Request_Interceptor.cpp b/TAO/tao/RTScheduling/Request_Interceptor.cpp
index 985e219d14a..e27c5b49172 100644
--- a/TAO/tao/RTScheduling/Request_Interceptor.cpp
+++ b/TAO/tao/RTScheduling/Request_Interceptor.cpp
@@ -53,7 +53,7 @@ Client_Interceptor::send_request (PortableInterceptor::ClientRequestInfo_ptr ri)
TAOLIB_DEBUG ((LM_DEBUG,
"The Guid is %d %d\n",
id,
- TAO_RTScheduler_Current::guid_counter.value_i ()));
+ TAO_RTScheduler_Current::guid_counter.load ()));
// Create new DT.
RTScheduling::DistributableThread_var dt =
diff --git a/TAO/tao/RTScheduling/Request_Interceptor.h b/TAO/tao/RTScheduling/Request_Interceptor.h
index 48bfe663054..879d73a7876 100644
--- a/TAO/tao/RTScheduling/Request_Interceptor.h
+++ b/TAO/tao/RTScheduling/Request_Interceptor.h
@@ -13,7 +13,7 @@
TAO_BEGIN_VERSIONED_NAMESPACE_DECL
-extern ACE_Atomic_Op<TAO_SYNCH_MUTEX, long> server_guid_counter;
+extern std::atomic<long> server_guid_counter;
class TAO_RTScheduler_Export Client_Interceptor:
public PortableInterceptor::ClientRequestInterceptor,
diff --git a/TAO/tao/Reply_Dispatcher.cpp b/TAO/tao/Reply_Dispatcher.cpp
index 230b4c623e1..93c08198894 100644
--- a/TAO/tao/Reply_Dispatcher.cpp
+++ b/TAO/tao/Reply_Dispatcher.cpp
@@ -36,8 +36,8 @@ TAO_Reply_Dispatcher::intrusive_remove_ref (TAO_Reply_Dispatcher* rd)
{
if (rd != nullptr)
{
- long const tmp = --rd->refcount_;
- if (tmp <= 0)
+ uint32_t const tmp = --rd->refcount_;
+ if (tmp == 0)
{
if (rd->allocator_)
{
diff --git a/TAO/tao/Reply_Dispatcher.h b/TAO/tao/Reply_Dispatcher.h
index b08cd76ed77..0b6c39a311d 100644
--- a/TAO/tao/Reply_Dispatcher.h
+++ b/TAO/tao/Reply_Dispatcher.h
@@ -103,7 +103,7 @@ protected:
private:
/// Support for intrusive reference counting
- ACE_Atomic_Op<TAO_SYNCH_MUTEX, long> refcount_;
+ std::atomic<uint32_t> refcount_;
/// Allocator that was used to allocate this reply dispatcher. In case of
/// zero we come from the heap.
diff --git a/TAO/tao/Stub.cpp b/TAO/tao/Stub.cpp
index 1be51e3c49c..c132daaeef9 100644
--- a/TAO/tao/Stub.cpp
+++ b/TAO/tao/Stub.cpp
@@ -456,11 +456,7 @@ TAO_Stub::set_policy_overrides (const CORBA::PolicyList & policies,
CORBA::SetOverrideType set_add)
{
// Notice the use of an explicit constructor....
-#if defined (ACE_HAS_CPP11)
std::unique_ptr<TAO_Policy_Set> policy_manager (new TAO_Policy_Set (TAO_POLICY_OBJECT_SCOPE));
-#else
- auto_ptr<TAO_Policy_Set> policy_manager (new TAO_Policy_Set (TAO_POLICY_OBJECT_SCOPE));
-#endif /* ACE_HAS_CPP11 */
if (set_add == CORBA::SET_OVERRIDE)
{
diff --git a/TAO/tao/Stub.h b/TAO/tao/Stub.h
index 9f31b1b878c..de3020ed58c 100644
--- a/TAO/tao/Stub.h
+++ b/TAO/tao/Stub.h
@@ -22,11 +22,7 @@
#include "tao/MProfile.h"
#include "tao/ORB_Core_Auto_Ptr.h"
-#if defined (ACE_HAS_CPP11)
-# include <atomic>
-#else
-# include "ace/Atomic_Op.h"
-#endif /* ACE_HAS_CPP11 */
+#include <atomic>
#if defined (HPUX) && defined (IOR)
/* HP-UX 11.11 defines IOR in /usr/include/pa/inline.h
@@ -384,11 +380,7 @@ protected:
CORBA::Boolean profile_success_;
/// Reference counter.
-#if defined (ACE_HAS_CPP11)
std::atomic<uint32_t> refcount_;
-#else
- ACE_Atomic_Op<TAO_SYNCH_MUTEX, unsigned long> refcount_;
-#endif /* ACE_HAS_CPP11 */
/// The policy overrides in this object, if nil then use the default
/// policies.
@@ -418,7 +410,7 @@ protected:
/// True if forwarding request upon some specific exceptions
/// (e.g. OBJECT_NOT_EXIST) already happened.
- ACE_Atomic_Op<TAO_SYNCH_MUTEX, bool> forwarded_on_exception_;
+ std::atomic<bool> forwarded_on_exception_;
};
// Define a TAO_Stub auto_ptr class.
diff --git a/TAO/tao/Stub.inl b/TAO/tao/Stub.inl
index 7c638ccf206..146414ac160 100644
--- a/TAO/tao/Stub.inl
+++ b/TAO/tao/Stub.inl
@@ -393,7 +393,7 @@ void TAO_Stub::forwarded_on_exception (bool forwarded)
ACE_INLINE
bool TAO_Stub::forwarded_on_exception () const
{
- return forwarded_on_exception_.value ();
+ return forwarded_on_exception_;
}
ACE_INLINE
diff --git a/TAO/tao/Synch_Invocation.cpp b/TAO/tao/Synch_Invocation.cpp
index 69e7f948fac..ee073e085d3 100644
--- a/TAO/tao/Synch_Invocation.cpp
+++ b/TAO/tao/Synch_Invocation.cpp
@@ -580,11 +580,7 @@ namespace TAO
// We must manage the memory allocated
// by the call above to alloc().
-#if defined (ACE_HAS_CPP11)
std::unique_ptr<CORBA::Exception> safety (exception);
-#else
- auto_ptr<CORBA::Exception> safety (exception);
-#endif /* ACE_HAS_CPP11 */
exception->_raise ();
@@ -731,11 +727,7 @@ namespace TAO
// Without this, the call to create_system_exception() above
// causes a memory leak. On platforms without native exceptions,
// the CORBA::Environment class manages the memory.
-#if defined (ACE_HAS_CPP11)
std::unique_ptr<CORBA::SystemException> safety (ex);
-#else
- auto_ptr<CORBA::SystemException> safety (ex);
-#endif /* ACE_HAS_CPP11 */
ex->minor (minor);
ex->completed (CORBA::CompletionStatus (completion));
diff --git a/TAO/tao/Valuetype/AbstractBase.h b/TAO/tao/Valuetype/AbstractBase.h
index d23b249e062..a67601acfed 100644
--- a/TAO/tao/Valuetype/AbstractBase.h
+++ b/TAO/tao/Valuetype/AbstractBase.h
@@ -25,11 +25,7 @@
#include "tao/Objref_VarOut_T.h"
#include "tao/Object.h" /* For CORBA::Object_var */
#include "tao/Pseudo_VarOut_T.h"
-#if defined (ACE_HAS_CPP11)
-# include <atomic>
-#else
-# include "ace/Atomic_Op.h"
-#endif /* ACE_HAS_CPP11 */
+#include <atomic>
TAO_BEGIN_VERSIONED_NAMESPACE_DECL
@@ -55,7 +51,6 @@ namespace CORBA
class TAO_Valuetype_Export AbstractBase
{
public:
-
/// Constructor.
/**
* This constructor is only meant to be called by the
@@ -127,7 +122,6 @@ namespace CORBA
void _decr_refcount (void);
protected:
-
AbstractBase (void);
AbstractBase (const AbstractBase &);
@@ -138,7 +132,6 @@ namespace CORBA
CORBA::Boolean is_objref_;
private:
-
AbstractBase & operator= (const AbstractBase &);
virtual CORBA::ValueBase *_tao_to_value (void);
@@ -146,13 +139,8 @@ namespace CORBA
CORBA::Object_ptr create_object (TAO_Stub *stub);
private:
-
/// Number of outstanding references to this object.
-#if defined (ACE_HAS_CPP11)
std::atomic<uint32_t> refcount_;
-#else
- ACE_Atomic_Op<TAO_SYNCH_MUTEX, unsigned long> refcount_;
-#endif /* ACE_HAS_CPP11 */
CORBA::Boolean is_collocated_;
TAO_Abstract_ServantBase *servant_;
diff --git a/TAO/tao/Valuetype/ValueBase.cpp b/TAO/tao/Valuetype/ValueBase.cpp
index dd0a46c847e..0f4f33161b6 100644
--- a/TAO/tao/Valuetype/ValueBase.cpp
+++ b/TAO/tao/Valuetype/ValueBase.cpp
@@ -1428,11 +1428,7 @@ CORBA::DefaultValueRefCountBase::_tao_remove_ref (void)
CORBA::ULong
CORBA::DefaultValueRefCountBase::_tao_refcount_value (void) const
{
-#if defined (ACE_HAS_CPP11)
return this->refcount_;
-#else
- return this->refcount_.value ();
-#endif /* ACE_HAS_CPP11 */
}
// ===========================================================
diff --git a/TAO/tao/Valuetype/ValueBase.h b/TAO/tao/Valuetype/ValueBase.h
index 490ee436614..add847fabef 100644
--- a/TAO/tao/Valuetype/ValueBase.h
+++ b/TAO/tao/Valuetype/ValueBase.h
@@ -30,11 +30,7 @@
#include "ace/Basic_Types.h"
#include "ace/Synch_Traits.h"
#include "ace/Thread_Mutex.h"
-#if defined (ACE_HAS_CPP11)
-# include <atomic>
-#else
-# include "ace/Atomic_Op.h"
-#endif /* ACE_HAS_CPP11 */
+#include <atomic>
#include "ace/Null_Mutex.h"
#include "ace/Vector_T.h"
@@ -347,11 +343,7 @@ namespace CORBA
private: // data
/// Reference counter.
-#if defined (ACE_HAS_CPP11)
std::atomic<uint32_t> refcount_;
-#else
- ACE_Atomic_Op<TAO_SYNCH_MUTEX, unsigned long> refcount_;
-#endif /* ACE_HAS_CPP11 */
}; // DefaultValueRefCountBase
// which lock has the lowest memory overhead ?
diff --git a/TAO/tao/Valuetype/ValueFactory.h b/TAO/tao/Valuetype/ValueFactory.h
index ba9596b0bdb..ddfafde6f4c 100644
--- a/TAO/tao/Valuetype/ValueFactory.h
+++ b/TAO/tao/Valuetype/ValueFactory.h
@@ -26,11 +26,7 @@
#include "ace/Synch_Traits.h"
#include "ace/Thread_Mutex.h"
#include "ace/Null_Mutex.h"
-#if defined (ACE_HAS_CPP11)
-# include <atomic>
-#else
-# include "ace/Atomic_Op.h"
-#endif /* ACE_HAS_CPP11 */
+#include <atomic>
TAO_BEGIN_VERSIONED_NAMESPACE_DECL
@@ -72,11 +68,7 @@ namespace CORBA
private:
/// Reference counter.
-#if defined (ACE_HAS_CPP11)
std::atomic<uint32_t> refcount_;
-#else
- ACE_Atomic_Op<TAO_SYNCH_MUTEX, unsigned long> refcount_;
-#endif /* ACE_HAS_CPP11 */
};
} // End CORBA namespace