Namespaces
Variants
Views
Actions

operator==,!=(std::istream_iterator)

From cppreference.com
< cpp‎ | iterator‎ | istream iterator
Revision as of 17:07, 5 June 2013 by P12 (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
template< class T, class CharT, class Traits, class Dist >

bool operator==( const istream_iterator<T,CharT,Traits,Dist>& lhs,

                 const istream_iterator<T,CharT,Traits,Dist>& rhs );
(1)
template< class CharT, class Traits >

bool operator!=( const istream_iterator<T,CharT,Traits,Dist>& lhs,

                 const istream_iterator<T,CharT,Traits,Dist>& rhs );
(2)

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.

1) Checks whether lhs is equal to rhs.
2) Checks whether lhs is not equal to rhs.

[edit] Parameters

lhs, rhs - stream iterators to compare

[edit] Return value

1) true if lhs is equal to rhs, false otherwise.
2) true if lhs is not equal to rhs, false otherwise.

[edit] Exceptions

(none)