VarStreamArrayIterator returns a reference to a just-computed internal
value; since it's an iterator over ValueType, change operator*() to
always return ValueType&.
This patch is conservative in case it's useful to std::move() out an
extracted value...
But another option is to change it to iterate over const ValueType
and always return const ValueType&:
... : iterator_facade_base<..., const ValueType>
It only requires a one-line change to ExplainOutputStyle.cpp to get tests
compiling and passing:
- DbiModuleDescriptor &Descriptor = *Prev; + const DbiModuleDescriptor &Descriptor = *Prev;
Based on 175d70ee5c2f03f640151488f5f33b7bd9b96f8d, perhaps that would
better match the original intent? @amccarth, @zturner, thoughts?