|
Boost Users : |
From: David Abrahams (dave_at_[hidden])
Date: 2007-07-11 20:31:14
on Wed Jul 11 2007, Max Motovilov <max-AT-motovilov.net> wrote:
> It is not immediately obvious how to correctly specify the template
> arguments for boost::iterator_facade<> with an output iterator. This
> particular case is not mentioned in the tutorial and the first
> impression is that using such category as std::output_iterator_tag
> should be all that's required. This is not the case; in order for the
> postincrement temporary NOT to create a copy of a [fake] pointed-to
> value OR a copy of the proxy, the user has to be very careful about
> Value and Reference arguments. Took me 3 tries and a thorough look into
> the sources to get it right: Value=<argument of Proxy::operator=> and
> Reference=Proxy&. Would be nice to add this use case to the tutorial
> since it is definitely tricky and error-prone as it is.
It sounds like you're the perfect candidate to write those docs.
Patches gratefully accepted.
-- Dave Abrahams Boost Consulting http://www.boost-consulting.com The Astoria Seminar ==> http://www.astoriaseminar.com
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