diff options
Diffstat (limited to 'gcc-4.8/libstdc++-v3/include/bits/shared_ptr_base.h')
-rw-r--r-- | gcc-4.8/libstdc++-v3/include/bits/shared_ptr_base.h | 6 |
1 files changed, 3 insertions, 3 deletions
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); } |