summaryrefslogtreecommitdiff
path: root/TAO/tao/AnyTypeCode/NVList.h
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/tao/AnyTypeCode/NVList.h')
-rw-r--r--TAO/tao/AnyTypeCode/NVList.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/TAO/tao/AnyTypeCode/NVList.h b/TAO/tao/AnyTypeCode/NVList.h
index 24aa3a9498d..e68f65402bf 100644
--- a/TAO/tao/AnyTypeCode/NVList.h
+++ b/TAO/tao/AnyTypeCode/NVList.h
@@ -26,8 +26,11 @@
#include "ace/Unbounded_Queue.h"
#include "ace/Thread_Mutex.h"
-#include "ace/Atomic_Op.h"
-
+#if defined (ACE_HAS_CPP11)
+# include <atomic>
+#else
+# include "ace/Atomic_Op.h"
+#endif /* ACE_HAS_CPP11 */
TAO_BEGIN_VERSIONED_NAMESPACE_DECL
@@ -120,7 +123,11 @@ 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_;
@@ -263,7 +270,11 @@ 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_;