|
Boost Users : |
From: Thorsten Ottosen (tottosen_at_[hidden])
Date: 2006-02-12 17:55:12
David Abrahams wrote:
> Thorsten Ottosen <tottosen_at_[hidden]> writes:
>
>
>>David Abrahams wrote:
>>
>>>"Bill Buklis" <boostuser_at_[hidden]> writes:
>>>
>>>
>>>
>>>>The predicate for std::find_if requires *iterator for the parameter.
>>>>However, with ptr_map *iterator returns a reference to the element value
>>>>instead of the key/value pair. Normally this is fine (in general code I like
>>>>this feature)
>>>
>>>
>>>Yikes, this sounds like a gratuitous inconsistency with the standard
>>>map semantics, and not one that's "obviously better" than the standard
>>>one. Why be inventive here?
>>
>>well, the general idea of the library is to hide direct access to the
>>pointers. its shows up most in ptr_map.
>>
>>the alternative would be to return a "pair-proxy" from operator*().
>
>
> a tuple of references would work nicely, neh?
I guess it would.
Do we want to break code to introduce this?
-Thorsten
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