To be clear, I was not talking about different ownership, but same ownership, but the same flexibility as unique_ptr provides with custom deleters.
-----Ursprüngliche Nachricht-----
Von: JOHN MORRISON via Std-Proposals <std-proposals@lists.isocpp.org>
Gesendet: So 16.02.2025 22:07
Betreff: Re: [std-proposals] A non-owning but self zeroing smart pointer for single ownership
An: std-proposals@lists.isocpp.org;
CC: JOHN MORRISON <inglesflamenco@hotmail.com>;
Sebastian wrote: It is possible to change the order of the types So that unique_ptr is the template argument instead of notify_ptrs. In that way it would work with any resource. It would be an efficient reference-counted abstraction for any object with ownership semantics.Hi Sebastian,I think what you are talking about here is way outside the scope of what I'm trying to do. You seem to be talking about a more generic approach that leverages notify_ptrs to manages a wider range of ownership possibilities. But notify_ptrs is strongly wedded to the structure of unique_ptr and would not work for instance with shared_ptr. Neither would I want it to because we already have weak_ptr that.I would not want to change the order of the types because that would only further obscure the fact that what you have is just the well trusted unique_ptr with a deleter hook.-- Std-Proposals mailing list Std-Proposals@lists.isocpp.org https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals