
8 May
2012
8 May
'12
6:44 p.m.
template<class Float> struct NaNtheLess { bool operator()(Float lhs, Float rhs)const { return tr1::isnan(lhs) ? !tr1::isnan(rhs) : std::less<Float>()(lhs, rhs); } };
...
Hope this solves your problems.
That looks like a great solution, thanks! Perhaps this is useful for simplifying "not_a_date_time" too. NaNtheless, I am a NaN loather ;)
Cheers, Joachim
I find it NaNcomfortable to deal with as well, and I can feel your pain. :-) Cheers! Andrew Hundt