typeid(double) does not respect NaNs

Maxim Fomin maxim at maxim-fomin.ru
Tue Jul 9 09:04:29 PDT 2013


On Tuesday, 9 July 2013 at 13:46:48 UTC, H. S. Teoh wrote:
> On Tue, Jul 09, 2013 at 08:05:35AM +0200, deadalnix wrote:
>> On Tuesday, 9 July 2013 at 03:03:34 UTC, H. S. Teoh wrote:
>> >More to the point, *if* typeinfo isn't meant to match == for 
>> >whatever
>> >reason, then why is it being used as the standard of 
>> >comparison for
>> >AA keys?
>> >
>> 
>> I guess we need NaN == NaN to be true for AA keys, no ?
>
> Not according to: 
> http://d.puremagic.com/issues/show_bug.cgi?id=7836
>
> So, should NaN == NaN for AA keys, or not?
>
>
> T

I think it was not decided yet. From language coherency point of 
view NaN != NaN like in general case, from usefulness perspective 
you don't need several nans in AA array.


More information about the Digitalmars-d mailing list