Boost logo

Boost Users :

From: Daniel Mitchell (danmitchell_at_[hidden])
Date: 2006-07-13 12:10:05


In the documentation of iterator_facade it is stated that:

"The C++ standard requires an iterator's value_type not be const-qualified, so
iterator_facade strips the const from its Value parameter in order to produce
the iterator's value_type. Making the Value argument const provides a useful
hint to iterator_facade that the iterator is a constant iterator, and the
default Reference argument will be correct for all lvalue iterators."

and

"when defining a constant lvalue iterator, the user can pass a const-qualified
version of the iterator's value_type as iterator_facade's Value parameter and
omit the Reference parameter which follows."

Am I to understand from this that iterator_facade<Derived,T const,Category> is
equivalent to iterator_facade<Derived,T,Category,T const&>, and likewise for
iterator_adaptor?

D.


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