From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2008-07-29 23:39:44


AMDG

Steven Ross wrote:
> A functor is required because of the cast operation; I don't see any generic
> way to code a general cast operation.

How about using a traits template?

> NaNs get dumped in the last bucket by default, without special-casing.
> std::sort dumps them randomly in the file because they evaluate as
> equivalent to everything, which is a little odd, and behavior I have no
> intention to emulate.
>

The standard states that, "For the algorithms to work correctly,
comp has to induce a strict weak ordering on the values."
This is not true for NaNs, therefore, IMO, you don't need to worry
about them.

In Christ,
Steven Watanabe