From 88811a9753e9297baf6413267ccd51ff2cea2450 Mon Sep 17 00:00:00 2001 From: Tim Shen Date: Wed, 30 Nov 2016 14:46:15 +0000 Subject: [PATCH] Fix condition in shared_ptr assertion 2016-11-30 Tim Shen * include/bits/shared_ptr_base.h (__shared_ptr_access::operator*()): Fix assertion. From-SVN: r243027 --- libstdc++-v3/ChangeLog | 5 +++++ libstdc++-v3/include/bits/shared_ptr_base.h | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 3498e329238..349a35b2350 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,8 @@ +2016-11-30 Tim Shen + + * include/bits/shared_ptr_base.h + (__shared_ptr_access::operator*()): Fix assertion. + 2016-11-30 David Edelsohn * testsuite/18_support/50594.cc: XFAIL on AIX. diff --git a/libstdc++-v3/include/bits/shared_ptr_base.h b/libstdc++-v3/include/bits/shared_ptr_base.h index 953aa87436e..2fb70b7a5cb 100644 --- a/libstdc++-v3/include/bits/shared_ptr_base.h +++ b/libstdc++-v3/include/bits/shared_ptr_base.h @@ -1000,7 +1000,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION element_type& operator*() const noexcept { - __glibcxx_assert(_M_ptr != nullptr); + __glibcxx_assert(_M_get() != nullptr); return *_M_get(); } -- 2.30.2