C++ Logo

std-discussion

Advanced search

Re: Values of objects

From: Tony V E <tvaneerd_at_[hidden]>
Date: Wed, 28 Aug 2019 18:18:24 -0400
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,
Tony

Received on 2019-08-28 17:20:41