From 680ffd20f55830dd5cbbb2bc090e27c8d586ff08 Mon Sep 17 00:00:00 2001 From: Tomasz Grabiec Date: Mon, 20 Mar 2017 17:37:38 +0100 Subject: [PATCH] compound: Use const bytes_view as iterator's value type The iterator doesn't really allow modifying unserlying component. This change enables using the iterator with boost::make_iterator_range() and boost::range::join(), which get utterly confused otherwise. --- compound.hh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compound.hh b/compound.hh index eddc6ac371..7180f6829b 100644 --- a/compound.hh +++ b/compound.hh @@ -130,10 +130,10 @@ public: bytes decompose_value(const value_type& values) { return serialize_value(values); } - class iterator : public std::iterator { + class iterator : public std::iterator { private: bytes_view _v; - value_type _current; + bytes_view _current; private: void read_current() { size_type len;