On Monday, 24 February 2025 16:01:01 Brasilia Standard Time JOHN MORRISON via
Std-Proposals wrote:
> ptr_to_unique does use a control block. It isn't as burdensome as that of
> shared_ptr/weak_ptr but it is more than half way there.
No, it's EXACTLY as burdensome as shared_ptr / weak_ptr. It may not allow
doing some operations, but the overhead is exactly the same.
> It also requires the unique_ptr it works with to be fattened by a notifying
> mechanism (custom deleter) that holds a pointer to the control block.
In other words, it's not a unique_ptr, but something else.
> Performance isn't the motivation. The motivation is to have something that
> works with unique_ptr because single ownership is often a requirement in a
> model and I want to hold long term references to items within that model
> that test as null when they are no longer valid.
Except that it's not unique_ptr. It's something else.
--
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
Principal Engineer - Intel DCAI Platform & System Engineering
--
Std-Proposals mailing list
Std-Proposals@lists.isocpp.org
https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals