Commit b90a2ba5 authored by Nick Terrell's avatar Nick Terrell Committed by Facebook Github Bot 0

Add default constructor to folly::IOBuf::Iterator.

Summary:
Iterators must be default constructible.
folly::IOBuf can now be used as a range in ranges-v3.

Reviewed By: yfeldblum

Differential Revision: D3782536

fbshipit-source-id: 854813b4e3336aba50048649e6ae7b375d49e382
parent 7259fd8c
...@@ -1480,6 +1480,8 @@ class IOBuf::Iterator : public boost::iterator_facade< ...@@ -1480,6 +1480,8 @@ class IOBuf::Iterator : public boost::iterator_facade<
} }
} }
Iterator() {}
private: private:
void setVal() { void setVal() {
val_ = ByteRange(pos_->data(), pos_->tail()); val_ = ByteRange(pos_->data(), pos_->tail());
...@@ -1510,8 +1512,8 @@ class IOBuf::Iterator : public boost::iterator_facade< ...@@ -1510,8 +1512,8 @@ class IOBuf::Iterator : public boost::iterator_facade<
adjustForEnd(); adjustForEnd();
} }
const IOBuf* pos_; const IOBuf* pos_{nullptr};
const IOBuf* end_; const IOBuf* end_{nullptr};
ByteRange val_; ByteRange val_;
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment