Merge pull request #3650 from tambry:std_iterator
PiperOrigin-RevId: 409417242
This commit is contained in:
commit
25208a60a2
@ -5424,12 +5424,14 @@ class Streamlike {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
class ConstIter : public std::iterator<std::input_iterator_tag,
|
class ConstIter {
|
||||||
value_type,
|
|
||||||
ptrdiff_t,
|
|
||||||
const value_type*,
|
|
||||||
const value_type&> {
|
|
||||||
public:
|
public:
|
||||||
|
using iterator_category = std::input_iterator_tag;
|
||||||
|
using value_type = T;
|
||||||
|
using difference_type = ptrdiff_t;
|
||||||
|
using pointer = const value_type*;
|
||||||
|
using reference = const value_type&;
|
||||||
|
|
||||||
ConstIter(const Streamlike* s,
|
ConstIter(const Streamlike* s,
|
||||||
typename std::list<value_type>::iterator pos)
|
typename std::list<value_type>::iterator pos)
|
||||||
: s_(s), pos_(pos) {}
|
: s_(s), pos_(pos) {}
|
||||||
|
Loading…
Reference in New Issue
Block a user