|
Boost : |
Subject: Re: [boost] [contract] toward N3351 concepts
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2012-09-28 21:21:35
AMDG
On 09/27/2012 07:29 AM, Andrew Sutton wrote:
>
>> For instance, axiom EqualityComparable::Reflexivity states that some
>> (rather than every) objects must compare equal to themselves. If you
>> consider type float, objects with value NaN (not-a-number) compare unequal.
>
> No; all well-formed values of a type can be compared for equality (if
> the type is EqualityComparable). NaN is not a well-formed value. It is
> literally *not a number*.
>
Unless you mean to say that any program that uses
a NaN in any way has undefined behavior, this notion
of a "well-formed value" seems arbitrary and capricious.
In Christ,
Steven Watanabe
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk