C++ Logo


Advanced search

Subject: Re: Values of objects
From: Tony V E (tvaneerd_at_[hidden])
Date: 2019-08-28 17:18:24

On Wed, Aug 28, 2019 at 6:01 PM Krystian Stasiowski via Std-Discussion <
std-discussion_at_[hidden]> wrote:

> I agree, we should not define what a value is (except for trivially
> copyable types), however, I do believe that we should at least explicitly
> that that all objects have a value.--

I'm not sure a mutex has a value.
You can say it has a state (locked or not), but if it had a value, I'd next
ask if two mutexes are equal...
Or maybe the value of a mutex includes the thread (or thread id) that owns
it? But a thread can own/lock two different mutexes at once - do they have
the same value.
You still need more - basically you need the address/identity of the mutex
to be part of its value. And typically address isn't part of value.

Be seeing you,

STD-DISCUSSION list run by std-discussion-owner@lists.isocpp.org

Older Archives on Google Groups