From: Beman Dawes (beman_at_[hidden])
Date: 1999-08-16 16:18:50
At 03:53 PM 8/16/99 -0500, Andy Glew wrote:
>> Well, as we have been discussing, you can either wrap up all the
>> containers, or write just one wrapper for any iterator. I'll add
>> the latter to my to-do list for weak_ptr.
>OK, I may just have seen through the keyhole:
>Are STL containers required to implement methods that return
>iterators, such as map_instance.find(key), in terms of primitive
>iterator operations such as ++, --, +=, etc.?
Some container operations (associative clear() for example) have
requirements in terms of other container operations. But many
requirements place no such restrictions on how the requiremnts are
met. Associative find, for example, is simply specified as "returns
an iterator pointing to an element with the key equivalent to k, or
a.end() if such an element is not found." There is no specification
of how a map does the internal tree traversals which it may (or may
not) be doing to satisfy a find().
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk