Boost logo

Boost Users :

From: Nicola (nvitacolonna_at_[hidden])
Date: 2008-04-11 07:25:53


In article
<A194A82A1A084C4C8A29AD16E363B5F80100F635_at_WIN2003s325.its.local>,
 "Patrick Loney" <Patrick.Loney_at_[hidden]> wrote:

> > 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


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net