Index: boost/atomic/detail/base.hpp =================================================================== --- boost/atomic/detail/base.hpp (revision 82860) +++ boost/atomic/detail/base.hpp (working copy) @@ -143,11 +143,11 @@ typedef T value_type; typedef lockpool::scoped_lock guard_type; public: - base_atomic(void) {} + BOOST_CONSTEXPR base_atomic(void) BOOST_NOEXCEPT {} - explicit base_atomic(const value_type & v) + explicit BOOST_CONSTEXPR base_atomic(const value_type & v) BOOST_NOEXCEPT : v_(v) { - memcpy(&v_, &v, sizeof(value_type)); + //memcpy(&v_, &v, sizeof(value_type)); } void @@ -216,9 +216,13 @@ BOOST_ATOMIC_DECLARE_BASE_OPERATORS private: +#ifndef BOOST_NO_CXX11_DELETED_FUNCTIONS + base_atomic(const base_atomic &) = delete; + void operator=(const base_atomic &) = delete; +#else base_atomic(const base_atomic &) /* = delete */ ; void operator=(const base_atomic &) /* = delete */ ; - +#endif char v_[sizeof(value_type)]; }; @@ -230,8 +234,8 @@ typedef T difference_type; typedef lockpool::scoped_lock guard_type; public: - explicit base_atomic(value_type v) : v_(v) {} - base_atomic(void) {} + explicit BOOST_CONSTEXPR base_atomic(value_type v) BOOST_NOEXCEPT : v_(v) {} + BOOST_CONSTEXPR base_atomic(void) BOOST_NOEXCEPT {} void store(value_type v, memory_order /*order*/ = memory_order_seq_cst) volatile @@ -342,8 +346,13 @@ BOOST_ATOMIC_DECLARE_INTEGRAL_OPERATORS private: +#ifndef BOOST_NO_CXX11_DELETED_FUNCTIONS + base_atomic(const base_atomic &) = delete; + void operator=(const base_atomic &) = delete; +#else base_atomic(const base_atomic &) /* = delete */ ; void operator=(const base_atomic &) /* = delete */ ; +#endif value_type v_; }; @@ -434,8 +443,13 @@ BOOST_ATOMIC_DECLARE_POINTER_OPERATORS private: - base_atomic(const base_atomic &) /* = delete */ ; +#ifndef BOOST_NO_CXX11_DELETED_FUNCTIONS + base_atomic(const base_atomic &) = delete; + void operator=(const base_atomic &) = delete; +#else + base_atomic(const base_atomic &) /* = delete */ ; void operator=(const base_atomic &) /* = delete */ ; +#endif value_type v_; }; @@ -446,8 +460,8 @@ typedef void * value_type; typedef lockpool::scoped_lock guard_type; public: - explicit base_atomic(value_type v) : v_(v) {} - base_atomic(void) {} + explicit BOOST_CONSTEXPR base_atomic(value_type v) BOOST_NOEXCEPT : v_(v) {} + BOOST_CONSTEXPR base_atomic(void) BOOST_NOEXCEPT {} void store(value_type v, memory_order /*order*/ = memory_order_seq_cst) volatile Index: boost/atomic/detail/gcc-x86.hpp =================================================================== --- boost/atomic/detail/gcc-x86.hpp (revision 82860) +++ boost/atomic/detail/gcc-x86.hpp (working copy) @@ -525,8 +525,8 @@ typedef T value_type; typedef T difference_type; public: - explicit base_atomic(value_type v) : v_(v) {} - base_atomic(void) {} + explicit BOOST_CONSTEXPR base_atomic(value_type v) BOOST_NOEXCEPT : v_(v) {} + BOOST_CONSTEXPR base_atomic(void) BOOST_NOEXCEPT {} void store(value_type v, memory_order order = memory_order_seq_cst) volatile @@ -651,8 +651,13 @@ BOOST_ATOMIC_DECLARE_INTEGRAL_OPERATORS private: +#ifndef BOOST_NO_CXX11_DELETED_FUNCTIONS + base_atomic(const base_atomic &) = delete; + void operator=(const base_atomic &) = delete; +#else base_atomic(const base_atomic &) /* = delete */ ; void operator=(const base_atomic &) /* = delete */ ; +#endif value_type v_; }; Index: boost/atomic/atomic.hpp =================================================================== --- boost/atomic/atomic.hpp (revision 82860) +++ boost/atomic/atomic.hpp (working copy) @@ -88,19 +88,25 @@ typedef T value_type; typedef atomics::detail::base_atomic::type, atomics::detail::storage_size_of::value, boost::is_signed::value > super; public: - atomic(void) : super() {} - explicit atomic(const value_type & v) : super(v) {} + BOOST_CONSTEXPR atomic(void) BOOST_NOEXCEPT: super() {} + explicit BOOST_CONSTEXPR atomic(const value_type & v) BOOST_NOEXCEPT: super(v) {} atomic & operator=(value_type v) volatile { super::operator=(v); return *const_cast(this); } +#ifndef BOOST_NO_CXX11_DELETED_FUNCTIONS + atomic(const atomic &) =delete; + atomic & operator=(const atomic &) =delete; +#else private: atomic(const atomic &) /* =delete */ ; atomic & operator=(const atomic &) /* =delete */ ; +#endif }; + typedef atomic atomic_char; typedef atomic atomic_uchar; typedef atomic atomic_schar;