Boost logo

Boost Users :

From: Oleg Smolsky (oleg.smolsky_at_[hidden])
Date: 2005-10-30 15:34:38


Hello Thorsten,

Thorsten Ottosen wrote on 29/10/2005 at 5:20 a.m.:
>> However, "first" and "second" don't seem to exist in ptr_map. Could
>> you shed some light on how I can iterate your map please?
> Please see
> http://www.boost.org/libs/ptr_container/doc/reference.html#map-iterator-operations
Right, I see. Well, xxx.key() makes sense, but IMHO overloading
operator*() to return the "value" is quite confusing. To me, it would
make more sense to provide explicit accessors such as:
        iterator.key
        iterator.value

Or something similar. Whether these are function calls or not, IMHO,
doesn't matter, but the readability would be a lot higher.

Best regards,
Oleg.


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