operator==,!=(std::istream_iterator<T, CharT, Traits, Dist>)

Header: <iterator>

Checks whether both lhs and rhs are equal. Two stream iterators are equal if both of them are end-of-stream iterators or both of them refer to the same stream.

# Declarations

template< class T, class CharT, class Traits, class Dist >
bool operator==( const std::istream_iterator<T, CharT, Traits, Dist>& lhs,
const std::istream_iterator<T, CharT, Traits, Dist>& rhs );
template< class T, class CharT, class Traits, class Dist >
bool operator!=( const std::istream_iterator<T, CharT, Traits, Dist>& lhs,
const std::istream_iterator<T, CharT, Traits, Dist>& rhs );

(until C++20)

friend bool operator==( const istream_iterator& i, std::default_sentinel_t );

(since C++20)

# Parameters

# Defect reports

DRApplied toBehavior as publishedCorrect behavior
LWG 261C++98the description of operator!= was missingadded