O
Old Wolf
In the documentation for std::find, it says:
find returns the first iterator i in the range [first, last)
for which the following condition holds:
*i == value.
However in my compiler's headers the implementation is:
template <class InputIterator, class T>
InputIterator find (InputIterator first, InputIterator last, const T& value)
{
while (first != last && *first != value)
++first;
return first;
}
So operator!= is required and operator== isn't. Is this conforming?
find returns the first iterator i in the range [first, last)
for which the following condition holds:
*i == value.
However in my compiler's headers the implementation is:
template <class InputIterator, class T>
InputIterator find (InputIterator first, InputIterator last, const T& value)
{
while (first != last && *first != value)
++first;
return first;
}
So operator!= is required and operator== isn't. Is this conforming?