Fix condition in shared_ptr assertion
authorTim Shen <timshen@google.com>
Wed, 30 Nov 2016 14:46:15 +0000 (14:46 +0000)
committerJonathan Wakely <redi@gcc.gnu.org>
Wed, 30 Nov 2016 14:46:15 +0000 (14:46 +0000)
2016-11-30  Tim Shen  <timshen@google.com>

* include/bits/shared_ptr_base.h
(__shared_ptr_access<T, L, true, false>::operator*()): Fix assertion.

From-SVN: r243027

libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/shared_ptr_base.h

index 3498e329238035c6579106ca6a6b184745ddec04..349a35b235033d151125ccdf718f81d761cdd519 100644 (file)
@@ -1,3 +1,8 @@
+2016-11-30  Tim Shen  <timshen@google.com>
+
+       * include/bits/shared_ptr_base.h
+       (__shared_ptr_access<T, L, true, false>::operator*()): Fix assertion.
+
 2016-11-30  David Edelsohn  <dje.gcc@gmail.com>
 
        * testsuite/18_support/50594.cc: XFAIL on AIX.
index 953aa87436e3b0a69cffcca9a83a1a721d89a69b..2fb70b7a5cb670ee46280f8449b1af9252619975 100644 (file)
@@ -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();
       }