Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2006-05-10 16:21:52

Larry Evans <cppljevans_at_[hidden]> writes:

> Sorry if following occurs twice. I sent it 2 hrs.
> ago and haven't seen it yet.
> On 05/01/2006 08:49 AM, Ronald Garcia wrote:
> > The review of Joel de Guzman's Fusion library begins today, May 1,
> > 2006, and continues through May 10, 2006.
> The boost/fusion/iterator/equal_to.hpp has:
> operator==(Iter1 const&, Iter2 const&)
> {
> return result_of::equal_to<Iter1, Iter2>::value;
> }
> Obviously only the types are compared and not the values.
> Shouldn't the values be compared as well?

There's no reason to compare the values. The only data you ever need
in such an iterator is a reference to the tuple being traversed, and
since it's illegal to compare iterators into different sequences, that
test would always be true.

Dave Abrahams
Boost Consulting

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