C++ Logo

std-proposals

Advanced search

Re: [std-proposals] A non-owning but self zeroing smart pointer for single ownership

From: JOHN MORRISON <inglesflamenco_at_[hidden]>
Date: Sun, 16 Feb 2025 17:14:20 +0000
  *
Sebastian wrote - So it is basically a single_thread_shared_ptr_without_weak_ptr_functionality<unique_ptr<T>>

I'm not sure how to unravel your single_thread_shared_ptr_without_weak_ptr_functionality concept but it doesn't sound right. There is nothing shared_ptr about it. It is designed to thoroughly respect single ownership. It does have the weak_ptr functionality of being non-owning and testable but not the ability to acquire ownership to keep something alive that is exposed to another thread. But that is ok because we never expose singly owned items to other threads (we already know that is an un-mitigateable disaster ) and that is all it can reference.


Received on 2025-02-16 17:14:23