Boost logo

Boost Users :

From: David Abrahams (dave_at_[hidden])
Date: 2004-12-13 22:50:53


Jim Lear wrote:

> So in the absolute most abhorently poor code example (let's just call it
> "meta-code"), the map operator would behave like:
>
> data_type &operator[](const iterator &i) { return i->second; }
>
> Am I just too ignorant to make any sense? :-) Maybe I'll crawl back into my
> hole. :-)

You're making sense, but consider this: why should the map get involved
in that operation at all when you can do it all with the iterator?
Seems like a design flaw to get another object involved needlessly.

-- 
Dave Abrahams
Boost Consulting
http://www.boost-consulting.com

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