diff mbox

Partial solution to LWG 523

Message ID 20161130144526.GR3301@redhat.com
State Superseded
Headers show

Commit Message

Jonathan Wakely Nov. 30, 2016, 2:45 p.m. UTC
On 30/11/16 13:03 +0000, Jonathan Wakely wrote:
>On 26/11/16 16:27 -0800, Tim Shen wrote:

>>diff --git a/libstdc++-v3/include/bits/shared_ptr_base.h b/libstdc++-v3/include/bits/shared_ptr_base.h

>>index 953aa87..2fb70b7 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();

>>      }

>

>Oops, thanks, but let's fix this separately (I'll do it now) so the

>rest of the patch only touches regex stuff.


I've fixed that with this patch, committed to trunk.
diff mbox

Patch

commit 18ee83fae4fef2fc720ef6aef0754377e6fe29e8
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Wed Nov 30 13:11:50 2016 +0000

    Fix condition in shared_ptr assertion
    
    2016-11-30  Tim Shen  <timshen@google.com>
    
    	* include/bits/shared_ptr_base.h
    	(__shared_ptr_access<T, L, true, false>::operator*()): Fix assertion.

diff --git a/libstdc++-v3/include/bits/shared_ptr_base.h b/libstdc++-v3/include/bits/shared_ptr_base.h
index 953aa87..2fb70b7 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();
       }