From 3f503fd32e456926f271b7d4bc485c91adc7b716 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sun, 5 May 2024 01:38:07 +0200 Subject: aa --- compat/borrowed-ptr.inl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'compat') diff --git a/compat/borrowed-ptr.inl b/compat/borrowed-ptr.inl index 05724fcd..a29e6b1c 100644 --- a/compat/borrowed-ptr.inl +++ b/compat/borrowed-ptr.inl @@ -215,6 +215,7 @@ template T* bptr::get() const noexcept else return nullptr; } + template T* bptr::operator->() const noexcept { auto* ret = get(); @@ -236,7 +237,7 @@ void bptr::swap(bptr& other) noexcept template uint32_t bptr::use_count() const noexcept { - if (blk) [[likely]] + if (blk && blk->_ptr) [[likely]] return blk->_count; else return 0; -- cgit v1.2.3