Ticket #8057: 8057.patch
File 8057.patch, 4.7 KB (added by , 10 years ago) |
---|
-
boost/atomic/detail/base.hpp
143 143 typedef T value_type; 144 144 typedef lockpool::scoped_lock guard_type; 145 145 public: 146 base_atomic(void){}146 BOOST_CONSTEXPR base_atomic(void) BOOST_NOEXCEPT {} 147 147 148 explicit base_atomic(const value_type &v)148 explicit BOOST_CONSTEXPR base_atomic(const value_type & v) BOOST_NOEXCEPT : v_(v) 149 149 { 150 memcpy(&v_, &v, sizeof(value_type));150 //memcpy(&v_, &v, sizeof(value_type)); 151 151 } 152 152 153 153 void … … 216 216 217 217 BOOST_ATOMIC_DECLARE_BASE_OPERATORS 218 218 private: 219 #ifndef BOOST_NO_CXX11_DELETED_FUNCTIONS 220 base_atomic(const base_atomic &) = delete; 221 void operator=(const base_atomic &) = delete; 222 #else 219 223 base_atomic(const base_atomic &) /* = delete */ ; 220 224 void operator=(const base_atomic &) /* = delete */ ; 221 225 #endif 222 226 char v_[sizeof(value_type)]; 223 227 }; 224 228 … … 230 234 typedef T difference_type; 231 235 typedef lockpool::scoped_lock guard_type; 232 236 public: 233 explicit base_atomic(value_type v): v_(v) {}234 base_atomic(void){}237 explicit BOOST_CONSTEXPR base_atomic(value_type v) BOOST_NOEXCEPT : v_(v) {} 238 BOOST_CONSTEXPR base_atomic(void) BOOST_NOEXCEPT {} 235 239 236 240 void 237 241 store(value_type v, memory_order /*order*/ = memory_order_seq_cst) volatile … … 342 346 343 347 BOOST_ATOMIC_DECLARE_INTEGRAL_OPERATORS 344 348 private: 349 #ifndef BOOST_NO_CXX11_DELETED_FUNCTIONS 350 base_atomic(const base_atomic &) = delete; 351 void operator=(const base_atomic &) = delete; 352 #else 345 353 base_atomic(const base_atomic &) /* = delete */ ; 346 354 void operator=(const base_atomic &) /* = delete */ ; 355 #endif 347 356 value_type v_; 348 357 }; 349 358 … … 434 443 435 444 BOOST_ATOMIC_DECLARE_POINTER_OPERATORS 436 445 private: 437 base_atomic(const base_atomic &) /* = delete */ ; 446 #ifndef BOOST_NO_CXX11_DELETED_FUNCTIONS 447 base_atomic(const base_atomic &) = delete; 448 void operator=(const base_atomic &) = delete; 449 #else 450 base_atomic(const base_atomic &) /* = delete */ ; 438 451 void operator=(const base_atomic &) /* = delete */ ; 452 #endif 439 453 value_type v_; 440 454 }; 441 455 … … 446 460 typedef void * value_type; 447 461 typedef lockpool::scoped_lock guard_type; 448 462 public: 449 explicit base_atomic(value_type v): v_(v) {}450 base_atomic(void){}463 explicit BOOST_CONSTEXPR base_atomic(value_type v) BOOST_NOEXCEPT : v_(v) {} 464 BOOST_CONSTEXPR base_atomic(void) BOOST_NOEXCEPT {} 451 465 452 466 void 453 467 store(value_type v, memory_order /*order*/ = memory_order_seq_cst) volatile -
boost/atomic/detail/gcc-x86.hpp
525 525 typedef T value_type; 526 526 typedef T difference_type; 527 527 public: 528 explicit base_atomic(value_type v): v_(v) {}529 base_atomic(void){}528 explicit BOOST_CONSTEXPR base_atomic(value_type v) BOOST_NOEXCEPT : v_(v) {} 529 BOOST_CONSTEXPR base_atomic(void) BOOST_NOEXCEPT {} 530 530 531 531 void 532 532 store(value_type v, memory_order order = memory_order_seq_cst) volatile … … 651 651 652 652 BOOST_ATOMIC_DECLARE_INTEGRAL_OPERATORS 653 653 private: 654 #ifndef BOOST_NO_CXX11_DELETED_FUNCTIONS 655 base_atomic(const base_atomic &) = delete; 656 void operator=(const base_atomic &) = delete; 657 #else 654 658 base_atomic(const base_atomic &) /* = delete */ ; 655 659 void operator=(const base_atomic &) /* = delete */ ; 660 #endif 656 661 value_type v_; 657 662 }; 658 663 -
boost/atomic/atomic.hpp
88 88 typedef T value_type; 89 89 typedef atomics::detail::base_atomic<T, typename atomics::detail::classify<T>::type, atomics::detail::storage_size_of<T>::value, boost::is_signed<T>::value > super; 90 90 public: 91 atomic(void): super() {}92 explicit atomic(const value_type & v): super(v) {}91 BOOST_CONSTEXPR atomic(void) BOOST_NOEXCEPT: super() {} 92 explicit BOOST_CONSTEXPR atomic(const value_type & v) BOOST_NOEXCEPT: super(v) {} 93 93 94 94 atomic & operator=(value_type v) volatile 95 95 { 96 96 super::operator=(v); 97 97 return *const_cast<atomic *>(this); 98 98 } 99 #ifndef BOOST_NO_CXX11_DELETED_FUNCTIONS 100 atomic(const atomic &) =delete; 101 atomic & operator=(const atomic &) =delete; 102 #else 99 103 private: 100 104 atomic(const atomic &) /* =delete */ ; 101 105 atomic & operator=(const atomic &) /* =delete */ ; 106 #endif 102 107 }; 103 108 109 104 110 typedef atomic<char> atomic_char; 105 111 typedef atomic<unsigned char> atomic_uchar; 106 112 typedef atomic<signed char> atomic_schar;