Added an operator< to Filter_iterator

This commit is contained in:
Clément Jamin 2012-03-09 11:43:02 +00:00
parent 9d084a088c
commit 5a5d838497
1 changed files with 11 additions and 0 deletions

View File

@ -485,6 +485,8 @@ template < class I, class P > struct Filter_iterator;
template < class I, class P >
bool operator==(const Filter_iterator<I,P>&, const Filter_iterator<I,P>&);
template < class I, class P >
bool operator<(const Filter_iterator<I,P>&, const Filter_iterator<I,P>&);
template < class I, class P >
struct Filter_iterator {
@ -551,6 +553,7 @@ public:
bool is_end() const { return (c_ == e_); }
friend bool operator== <>(const Self&, const Self&);
friend bool operator< <>(const Self&, const Self&);
};
template < class I, class P >
@ -572,6 +575,14 @@ bool operator==(const Filter_iterator<I,P>& it1,
return it1.base() == it2.base();
}
template < class I, class P >
inline
bool operator<(const Filter_iterator<I,P>& it1,
const Filter_iterator<I,P>& it2)
{
return it1.base() < it2.base();
}
template < class I, class P >
inline
bool operator!=(const Filter_iterator<I,P>& it1,