A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://cplusplus.com/reference/iterator/istream_iterator/operators/ below:

function template

<iterator>

std::relational operators (istream_iterator) (1)
template <class T, class charT, class traits, class Distance>  bool operator== (const istream_iterator<T,charT,traits,Distance>& lhs,                   const istream_iterator<T,charT,traits,Distance>& rhs);
(2)
template <class T, class charT, class traits, class Distance>  bool operator!= (const istream_iterator<T,charT,traits,Distance>& lhs,                   const istream_iterator<T,charT,traits,Distance>& rhs);

Relational operators for istream_iterator

Compares lhs to rhs:

Two end-of-stream iterators are always equal (no matter the particular stream each is associated).


Two non-end-of-stream iterators are equal when they are constructed from the same stream, or one is a copy of the other.
An end-of-stream iterator is never equal to a non-end-of-stream iterator.

These operators are overloaded in header <iterator>.



Parameters
lhs, rhs
istream_iterator objects (to the left- and right-hand side of the operator, respectively) of the same type.

Return Valuetrue if the condition holds, and false otherwise.

Data races Both objects, lhs and rhs, are accessed.

Exception safetyNo-throw guarantee: never throws exceptions.

See also
istream_iterator::istream_iterator
Construct istream iterator (public member function)

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4