Well, if we are really going to discuss such quibbles, I would also change "zero" to "equiv" because that's the usual "term" used for strict weak ordering. And I would avoid constructs like
template <typename T> compare (T const &a, T const &b) : v_ (compare () (a, b).v_) // <-- {}
by doing, for instance,
class compare { enum result { minus, equiv, plus }; result v_;
template <typename T> static result do_compare(const T& a, const T& b) {
if (a < b) return minus; else if (b < a) return plus;
return equiv; }
public: [...] };
ok, i didnt think too long about the implementation quality. but i will change it for the next time.
But there are more important points I think; first of all this: if all I can see "from the outside" is whether v_== minus [note: this is 'plus' in the original code] why keeping three states internally?
because i see no reason why they should be needed. and i can also exchange the meaning of plus and minus, if it is prefered.
jan
-- jan langer ... [EMAIL PROTECTED] "pi ist genau drei"
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost