commit b69bee71a9eaa91f3a6fae875d702c9d39b02354
Author: Jonathan Wakely <jwakely@redhat.com>
Date: Tue Dec 6 14:13:54 2016 +0000
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.
@@ -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;
}
};