diff options
Diffstat (limited to 'TAO/tao/AnyTypeCode/Any_Impl.h')
-rw-r--r-- | TAO/tao/AnyTypeCode/Any_Impl.h | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/TAO/tao/AnyTypeCode/Any_Impl.h b/TAO/tao/AnyTypeCode/Any_Impl.h index 57e304288e1..2446ec37368 100644 --- a/TAO/tao/AnyTypeCode/Any_Impl.h +++ b/TAO/tao/AnyTypeCode/Any_Impl.h @@ -23,14 +23,14 @@ #include "tao/AnyTypeCode/TAO_AnyTypeCode_Export.h" #include "tao/Basic_Types.h" -#include "ace/Synch_Traits.h" -#include "ace/Null_Mutex.h" -#include "ace/Thread_Mutex.h" -#include "ace/Atomic_Op.h" - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL -class ACE_Message_Block; -ACE_END_VERSIONED_NAMESPACE_DECL +#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 */ TAO_BEGIN_VERSIONED_NAMESPACE_DECL @@ -104,7 +104,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 */ }; } |