
30 Jul
2008
30 Jul
'08
3:39 a.m.
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