summaryrefslogtreecommitdiff
path: root/TAO/tao/AnyTypeCode/True_RefCount_Policy.h
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/tao/AnyTypeCode/True_RefCount_Policy.h')
-rw-r--r--TAO/tao/AnyTypeCode/True_RefCount_Policy.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/TAO/tao/AnyTypeCode/True_RefCount_Policy.h b/TAO/tao/AnyTypeCode/True_RefCount_Policy.h
index a4c96d3d7d7..0f5a0875873 100644
--- a/TAO/tao/AnyTypeCode/True_RefCount_Policy.h
+++ b/TAO/tao/AnyTypeCode/True_RefCount_Policy.h
@@ -25,7 +25,11 @@
#include "tao/orbconf.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
@@ -101,7 +105,11 @@ 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