Fix debug mode assertion for std::shared_ptr<void>
* include/bits/shared_ptr_base.h (__shared_ptr_access<T, L, false, true>::operator->()): Fix assertion. From-SVN: r243303
This commit is contained in:
parent
fb7b736cbb
commit
55037a694f
@ -1,3 +1,8 @@
|
||||
2016-12-06 Jonathan Wakely <jwakely@redhat.com>
|
||||
|
||||
* include/bits/shared_ptr_base.h
|
||||
(__shared_ptr_access<T, L, false, true>::operator->()): Fix assertion.
|
||||
|
||||
2016-12-06 Ville Voutilainen <ville.voutilainen@gmail.com>
|
||||
|
||||
Constrain optional's __constexpr_addressof in its return type
|
||||
|
@ -983,8 +983,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||
element_type*
|
||||
operator->() const noexcept
|
||||
{
|
||||
_GLIBCXX_DEBUG_PEDASSERT(_M_get() != nullptr);
|
||||
return static_cast<const __shared_ptr<_Tp, _Lp>*>(this)->get();
|
||||
auto __ptr = static_cast<const __shared_ptr<_Tp, _Lp>*>(this)->get();
|
||||
_GLIBCXX_DEBUG_PEDASSERT(__ptr != nullptr);
|
||||
return __ptr;
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user