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.
This commit is contained in:
@@ -130,10 +130,10 @@ public:
|
||||
bytes decompose_value(const value_type& values) {
|
||||
return serialize_value(values);
|
||||
}
|
||||
class iterator : public std::iterator<std::input_iterator_tag, bytes_view> {
|
||||
class iterator : public std::iterator<std::input_iterator_tag, const bytes_view> {
|
||||
private:
|
||||
bytes_view _v;
|
||||
value_type _current;
|
||||
bytes_view _current;
|
||||
private:
|
||||
void read_current() {
|
||||
size_type len;
|
||||
|
||||
Reference in New Issue
Block a user