Boost logo

Boost Users :

Subject: Re: [Boost-users] Container with insertion order
From: Igor R (boost.lists_at_[hidden])
Date: 2011-12-05 17:10:42


> Another (last ?) question: how is possible simulate operator== for boost
> multi_index?

No need to simulate, comparison operators are already defined for MIC.
You should only provide the relevant ops for your elements. In case of
mutable_pair it would look like this:
template<typename K,typename V>
bool operator ==(const mutable_pair<K, V> &lhs, const mutable_pair<K, V> &rhs)
{
  return lhs.first == rhs.first && lhs.second == rhs.second;
}


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