Boost logo

Boost Users :

Subject: Re: [Boost-users] Comparing two vectors element by element
From: Gevorg Voskanyan (v_gevorg_at_[hidden])
Date: 2008-09-10 09:01:57


Sean Farrow wrote:

> It's not allower, the sizes aren't identical.
> Sean.

Then I think you can perfectly use the function below:

bool bitset_vector_less( const std::vector< std::bitset< 6 > > & lhs,
                                   const std::vector< std::bitset< 6 > > & rhs )
{
    assert( lhs.size() == rhs.size() );
    return std::equal( lhs.begin(), lhs.end(), rhs.begin(), BitSetComp() );
}

where BitSetComp is the predicate you have shown earlier.

HTH,
Gevorg

      


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net