Boost logo

Boost :

Subject: Re: [boost] [ICL] #6853: boost::icl::contains(NaN) returns true
From: Jeffrey Lee Hellrung, Jr. (jeffrey.hellrung_at_[hidden])
Date: 2012-05-04 16:00:22


On Fri, May 4, 2012 at 11:54 AM, Lars Viklund <zao_at_[hidden]> wrote:

> On Fri, May 04, 2012 at 11:48:30AM -0700, Jeffrey Lee Hellrung, Jr. wrote:
> > On Fri, May 4, 2012 at 8:14 AM, Andrew Hundt <ahundt_at_[hidden]> wrote:
> > How well does std::set/std::map interact with NaN when floating point
> types
> > are used as keys?
>
> Undefinedly, most usually explodedly.
>
> For libraries that have sanity checks on the comparator, hard asserts.
> For the rest (or NDEBUG), amusing loss of elements and general
> malfunction.
>

Then it seems reasonable to me for ICL to also opt not to support NaN's in
favor of a simpler implementation, better performance, etc.

- Jeff


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk