From: Howard Hinnant (hinnant_at_[hidden])
Date: 2002-09-24 18:08:27
On Tuesday, September 24, 2002, at 07:18 PM, Bohdan wrote:
> "Douglas Gregor" <gregod_at_[hidden]> wrote in message
>> On Tuesday 24 September 2002 09:04 am, Peter Dimov wrote:
>>> From: "Bohdan" <warever_at_[hidden]>
>>>> Hmm ... , looks like my problem is too exotic :)
>>> No, it's not that exotic, the indirect iterator adaptor has the same
>>> problem. The answer to your original question is that yes, std/boost
>>> lacking pointer_traits (or dereference_traits) (consider the feature
>>> request acknowledged), and C++ is lacking typeof(*p).
>> ... or just iterator_traits extended to allow trivial iterators.
>> boost/iterator_traits.hpp, anyone?
> IMHO i like this idea. The simplest solutions are always the best , but
> are you sure that this two idioms (iterators & pointers ) should be
> mixed ?
> Does standart allow such iterators ?
> PS: not too serious:
> If "anyone" implements iterator_traits for a smart_ptr, than
> what will be the name for its iterator category:
> "uninterative_iterator_category" ?
I keep expecting Jeremy to jump in on this one, but I'll do it for him.
Check out Jeremy Siek's Improved Iterator Categories and Requirements:
I think the idea of separating out iterator traversal from dereference
return types is very interesting. Then smart pointers could have
dereference traits but not traversal traits.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk