diff options
Diffstat (limited to 'gcc-4.8/libstdc++-v3/include/bits')
-rw-r--r-- | gcc-4.8/libstdc++-v3/include/bits/atomic_base.h | 4 | ||||
-rw-r--r-- | gcc-4.8/libstdc++-v3/include/bits/shared_ptr_base.h | 6 | ||||
-rw-r--r-- | gcc-4.8/libstdc++-v3/include/bits/stl_vector.h | 3 |
3 files changed, 7 insertions, 6 deletions
diff --git a/gcc-4.8/libstdc++-v3/include/bits/atomic_base.h b/gcc-4.8/libstdc++-v3/include/bits/atomic_base.h index 609fe8b06..db4d200ae 100644 --- a/gcc-4.8/libstdc++-v3/include/bits/atomic_base.h +++ b/gcc-4.8/libstdc++-v3/include/bits/atomic_base.h @@ -764,11 +764,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION bool is_lock_free() const noexcept - { return __atomic_is_lock_free(_M_type_size(1), nullptr); } + { return __atomic_is_lock_free(sizeof(__pointer_type), nullptr); } bool is_lock_free() const volatile noexcept - { return __atomic_is_lock_free(_M_type_size(1), nullptr); } + { return __atomic_is_lock_free(sizeof(__pointer_type), nullptr); } void store(__pointer_type __p, diff --git a/gcc-4.8/libstdc++-v3/include/bits/shared_ptr_base.h b/gcc-4.8/libstdc++-v3/include/bits/shared_ptr_base.h index 5b0be418b..e661b6501 100644 --- a/gcc-4.8/libstdc++-v3/include/bits/shared_ptr_base.h +++ b/gcc-4.8/libstdc++-v3/include/bits/shared_ptr_base.h @@ -233,7 +233,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _M_add_ref_lock() { // Perform lock-free add-if-not-zero operation. - _Atomic_word __count = _M_use_count; + _Atomic_word __count = _M_get_use_count(); do { if (__count == 0) @@ -391,7 +391,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION public: template<typename... _Args> _Sp_counted_ptr_inplace(_Alloc __a, _Args&&... __args) - : _M_impl(__a), _M_storage() + : _M_impl(__a) { _M_impl._M_ptr = static_cast<_Tp*>(static_cast<void*>(&_M_storage)); // _GLIBCXX_RESOLVE_LIB_DEFECTS @@ -819,7 +819,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION : _M_ptr(__r.get()), _M_refcount() { __glibcxx_function_requires(_ConvertibleConcept<_Tp1*, _Tp*>) - auto __tmp = std::__addressof(*__r.get()); + auto __tmp = __r.get(); _M_refcount = __shared_count<_Lp>(std::move(__r)); __enable_shared_from_this_helper(_M_refcount, __tmp, __tmp); } diff --git a/gcc-4.8/libstdc++-v3/include/bits/stl_vector.h b/gcc-4.8/libstdc++-v3/include/bits/stl_vector.h index 69c6e278c..14de46112 100644 --- a/gcc-4.8/libstdc++-v3/include/bits/stl_vector.h +++ b/gcc-4.8/libstdc++-v3/include/bits/stl_vector.h @@ -1361,7 +1361,8 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER void _M_move_assign(vector&& __x, std::true_type) noexcept { - const vector __tmp(std::move(*this)); + vector __tmp(get_allocator()); + this->_M_impl._M_swap_data(__tmp._M_impl); this->_M_impl._M_swap_data(__x._M_impl); if (_Alloc_traits::_S_propagate_on_move_assign()) std::__alloc_on_move(_M_get_Tp_allocator(), |