
In article
The above works for me as well. Adding the const qualifier has also solved my original problem. So, operator() must be const qualified. Is
that documented somewhere or is it somehow inferrable?
It's inferable - the error raised is with function:
typename super_t::reference dereference() const { return m_f(*this->base()); }
Which is const qualified
Ok, I see. Now, my problem is not yet solved, actually: *it is not a "valid lvalue". How can I make an assignment like *it = 8 valid? The documentation says that "the resulting transform_iterator models [...] Writable Lvalue Iterator if transform_iterator::reference is a non-const reference". Apparently, I am not able to achieve that in my sample code. Nicola