Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r80620 - trunk/boost/lockfree/detail
From: tim_at_[hidden]
Date: 2012-09-21 14:39:37


Author: timblechmann
Date: 2012-09-21 14:39:37 EDT (Fri, 21 Sep 2012)
New Revision: 80620
URL: http://svn.boost.org/trac/boost/changeset/80620

Log:
lockfree: use std::atomic on msvc2012

patch by zouzou
Text files modified:
   trunk/boost/lockfree/detail/atomic.hpp | 7 +++++--
   trunk/boost/lockfree/detail/freelist.hpp | 1 +
   2 files changed, 6 insertions(+), 2 deletions(-)

Modified: trunk/boost/lockfree/detail/atomic.hpp
==============================================================================
--- trunk/boost/lockfree/detail/atomic.hpp (original)
+++ trunk/boost/lockfree/detail/atomic.hpp 2012-09-21 14:39:37 EDT (Fri, 21 Sep 2012)
@@ -10,9 +10,12 @@
 #include <boost/config.hpp>
 
 // at this time, neither gcc (4.7) not clang (3.2) completely implement atomic<>
+// MSVC has it from version 2012 onwards.
+#if !defined(_MSC_VER) || _MSC_VER < 1700
 #define BOOST_LOCKFREE_NO_HDR_ATOMIC
+#endif
 
-#if (__cplusplus < 201103L) || defined(BOOST_LOCKFREE_NO_HDR_ATOMIC)
+#if defined(BOOST_LOCKFREE_NO_HDR_ATOMIC)
 #include <boost/atomic.hpp>
 #else
 #include <atomic>
@@ -22,7 +25,7 @@
 namespace lockfree {
 namespace detail {
 
-#if (__cplusplus < 201103L) || defined(BOOST_LOCKFREE_NO_HDR_ATOMIC)
+#if defined(BOOST_LOCKFREE_NO_HDR_ATOMIC)
 using boost::atomic;
 using boost::memory_order_acquire;
 using boost::memory_order_consume;

Modified: trunk/boost/lockfree/detail/freelist.hpp
==============================================================================
--- trunk/boost/lockfree/detail/freelist.hpp (original)
+++ trunk/boost/lockfree/detail/freelist.hpp 2012-09-21 14:39:37 EDT (Fri, 21 Sep 2012)
@@ -13,6 +13,7 @@
 
 #include <boost/array.hpp>
 #include <boost/config.hpp>
+#include <boost/cstdint.hpp>
 #include <boost/noncopyable.hpp>
 #include <boost/static_assert.hpp>
 


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk