From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,f89c9977a6e4ceda X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-11-09 05:56:52 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!kibo.news.demon.net!news.demon.co.uk!demon!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Missing in Booch: range operations Date: 09 Nov 2002 13:56:56 +0000 Organization: Pushface Sender: simon@smaug.pushface.org Message-ID: References: <3dcb8eec$0$307$bed64819@news.gradwell.net> <1ec946d1.0211081307.24a6c05c@posting.google.com> NNTP-Posting-Host: pogner.demon.co.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: news.demon.co.uk 1036850211 7202 62.49.19.209 (9 Nov 2002 13:56:51 GMT) X-Complaints-To: abuse@demon.net NNTP-Posting-Date: Sat, 9 Nov 2002 13:56:51 +0000 (UTC) User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1 Xref: archiver1.google.com comp.lang.ada:30635 Date: 2002-11-09T13:56:56+00:00 List-Id: mheaney@on2.com (Matthew Heaney) writes: > The problem is that iterators only know about elements -- they don't > know anything about containers. Neither Charles nor the STL attempts > to detect this error. Matt, you say this as though it were a law of nature! There is nothing in the notion of iterator that prevents them knowing about the container. Indeed (being pedantic) the very name iterator indicates that there is a container involved (otherwise, what would you be iterating over?) dictionary.com says: iterator An object or routine for accessing items from a list, array or stream one at a time. By extension, the term can be used for an object or routine for accesing items from any data structure that can be viewed as a list. For example, a traverser is an iterator for tree-shaped data structures.