|
Boost : |
From: Peter Dimov (pdimov_at_[hidden])
Date: 2002-08-08 05:52:03
From: "George A. Heintzelman" <georgeh_at_[hidden]>
>
> IMHO to do this right this is something *like* an iterator_traits, it's
> a dereferenceable_traits. Unfortunately, the right way is to have
> iterator_traits defined in terms of dereferenceable_traits, but that
> requires a change to the standard :(. Alternatively, shared_ptr (&
> cousins) could define value_type, pointer, and reference, without
> defining difference_type or iterator_category -- meaning the parts of
> iterator_traits that are needed in this context would work fine, but
> the other parts would fail as they should. That latter might be the
> cleanest improvement without going through change to the standard...
This sounds reasonable. What definitions are required for the iterator
adaptors to work? Do we need ::pointer, for instance? ::reference? Or would
a single ::value_type do?
The auto_ptr practice of using ::element_type instead of ::value_type always
seemed a bit odd to me.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk