This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
__normal_iterator::operator==(), should it exist?
- To: libstdc++ at sourceware dot cygnus dot com
- Subject: __normal_iterator::operator==(), should it exist?
- From: Richard Andrews <richarda at ixla dot com dot au>
- Date: Wed, 17 Jan 2001 14:53:07 +1100
Hi folks, quick question
There doesn't seem to be a member operator==() or
operator!=() for __normal_iterator.
Is this by design?
Further info
(refers to 20010115 build of gcc and libstdc++)
The following works
bool compare( const std::vector<int>::iterator & lhs,
const std::vector<int>::iterator & rhs )
{
return (lhs == rhs );
}
But the following doesn't compile (it used to work with 20001220)
bool compare( const std::vector<int>::iterator & lhs,
const std::vector<int>::iterator & rhs )
{
return lhs.operator==(rhs );
}
no matching function for call to `std::__normal_iterator<int*,
std::vector<int, std::allocator<int> > >::operator==(const
std::__normal_iterator<int*, std::vector<int, std::allocator<int> > >&)
const'