C++ Logo

std-discussion

Advanced search

Re: Values of objects

From: Hyman Rosen <hyrosen_at_[hidden]>
Date: Wed, 28 Aug 2019 14:32:52 -0400
On Wed, Aug 28, 2019 at 2:13 PM language.lawyer--- via Std-Discussion <
std-discussion_at_[hidden]> wrote:

> By which definition, current or yours?
> The current definition does not impose such a requirement.
>

Mine. Since identity of value representation does not imply the results
of operator== (e.g., NaN, ±0), we should have two different words, one
for identity of value representation and one for result of operator==. I
believe it is sensible to use "same" for the former and "equal" for the
latter. Especially because of NaN, we can have situations where the
same values (see what I did there?) are both not equal and not not equal
to each other (i.e., operator== and operator!= both return false when they
are given a NaN parameter).

I don't really care what words are used, so you're welcome to bikeshed
different ones. (I have the feeling that there will be people who will
insist
on refusing to countenance the idea of sameness whatever it is called.)

Received on 2019-08-28 13:35:10