This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

__normal_iterator::operator==(), should it exist?


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'




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]