Defined in header <iterator> | ||
---|---|---|
template< class CharT, class Traits > bool operator==( const std::istreambuf_iterator<CharT,Traits>& lhs, const std::istreambuf_iterator<CharT,Traits>& rhs ); | (1) | |
template< class CharT, class Traits > bool operator!=( const std::istreambuf_iterator<CharT,Traits>& lhs, const std::istreambuf_iterator<CharT,Traits>& rhs ); | (2) | (until C++20) |
friend bool operator==( const istreambuf_iterator& lhs, std::default_sentinel_t ); | (3) | (since C++20) |
Checks whether both lhs
and rhs
are valid, or both are invalid, regardless of the stream buffer objects they use.
lhs.equal(rhs)
.!lhs.equal(rhs)
.lhs
is invalid. Equivalent to lhs.equal(istreambuf_iterator{})
.std::istreambuf_iterator<CharT,Traits>
is an associated class of the arguments. The | (since C++20) |
lhs, rhs | - | stream buffer iterators to compare |
lhs.equal(rhs)
.!lhs.equal(rhs)
.lhs.equal(istreambuf_iterator{})
.May throw implementation-defined exceptions.
© cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
https://en.cppreference.com/w/cpp/iterator/istreambuf_iterator/operator_cmp