C++ Logo

std-discussion

Advanced search

Re: Lack of ordering guarantees in shared_ptr wording

From: mauro russo <ing.russomauro_at_[hidden]>
Date: Sun, 16 Feb 2025 02:14:35 +0100
Hope to have got your point.

In my perspective, thread-safety is not a concept implicitly related to
only-read or read/write, despite I agree that I cannot think to any example
where only-read should make sense to get problems.

However, in my opinion, destructing the resource is itself not a read, but
a write operation.

On the other hand, taking into account the principle
dont-pay-for-what-you-dont-use, I wonder the implementations do use a fence
there.
Anyway, I will stop my contribution here, and wait for any interesting
development coming from the Brian's comment.

Received on 2025-02-16 01:14:46