operator==,!= (std::istream_iterator<T, CharT, Traits, Dist>)
Iterator concepts | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Iterator primitives | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Algorithm concepts and utilities | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Indirect callable concepts | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Common algorithm requirements | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Utilities | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Iterator adaptors | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
Member functions | ||||
Non-member functions | ||||
operator==
operator!=
(until C++20)
|
Defined in header
<iterator>
|
||
template
<
class
T,
class
CharT,
class
Traits,
class
Dist
>
bool
operator
==
(
const
std::
istream_iterator
<
T, CharT, Traits, Dist
>
&
lhs,
|
(1) | |
template
<
class
T,
class
CharT,
class
Traits,
class
Dist
>
bool
operator
!
=
(
const
std::
istream_iterator
<
T, CharT, Traits, Dist
>
&
lhs,
|
(2) | (until C++20) |
friend
bool
operator
==
(
const
istream_iterator
&
i,
std::
default_sentinel_t
)
;
|
(3) | (since C++20) |
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.
This function is not visible to ordinary unqualified or qualified lookup , and can only be found by argument-dependent lookup when std::istream_iterator<T, CharT, Traits, Dist> is an associated class of the arguments.
The
|
(since C++20) |
Parameters
lhs, rhs | - | stream iterators to compare |
Return value
Exceptions
May throw implementation-defined exceptions.
Defect reports
The following behavior-changing defect reports were applied retroactively to previously published C++ standards.
DR | Applied to | Behavior as published | Correct behavior |
---|---|---|---|
LWG 261 | C++98 |
the description of
operator!=
was missing
|
added |