Boost logo

Boost :

From: dan marsden (danmarsden_at_[hidden])
Date: 2005-11-29 14:20:12

--- John Maddock <john_at_[hidden]> wrote:
> There are still lots of issue with the comparison
> operators:
> The first error occurs in the < comparison, which
> ends up calling operator >
> in sequence_less.hpp:
> namespace sequence_less_detail {
> template <typename T,typename I1, typename I2>
> bool call(T const& self,I1 const& a, I2 const& b) {
> return *a < *b
> || !(*b > *a)
> && T::call(fusion::next(a), fusion::next(b));
> }
> }
> The thing is that's not a "less than" relation to
> begin with!

Yes, embarrasing typo, now corrected. It passed the
previous comparison tests. I extended the tests quite
a bit, defect failed tests before being fixed, passes
after fix.

> It's called from sequence_less::call which
> constructs a comparison object of
> type equal_to, which looks rather suspicious to me!

No problem here. The equal_to usage is to compare
iterators over the sequences being compared, to
established the loop termination point.

> I'm attaching the error messages below, but I think
> you're going to have to
> work with the test cases I sent you, *and* devise
> some runtime tests to
> ensure that these operators actually do what they're
> supposed to.

As mentioned above, I've extended the runtime tests to
avoid this sort of typo creeping through again. I also
copied the files that you sent to Joel into boost/tr1
and libs/tr1/test. I then ran all the tests with bjam
-sTOOLS=gcc. Amongst the mass of messages, it seemed
that tuple_test compiled, with some warnings about
unused variables. I believe this is a compile time
test, so this constitutes success? I hope this is how
the tests were supposed to be run, if not just give me
some pointers.

> Thanks for persuing this,
> John.

No problem, sorry about the dodgy first attempt.



Boost list run by bdawes at, gregod at, cpdaniel at, john at