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-13 12:22:54 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!postnews1.google.com!not-for-mail From: mheaney@on2.com (Matthew Heaney) Newsgroups: comp.lang.ada Subject: Re: Missing in Booch: range operations Date: 13 Nov 2002 12:22:54 -0800 Organization: http://groups.google.com/ Message-ID: <1ec946d1.0211131222.20775b96@posting.google.com> References: <3dcb8eec$0$307$bed64819@news.gradwell.net> <3dcccf4d$0$308$bed64819@news.gradwell.net> NNTP-Posting-Host: 66.162.65.162 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1037218974 12462 127.0.0.1 (13 Nov 2002 20:22:54 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 13 Nov 2002 20:22:54 GMT Xref: archiver1.google.com comp.lang.ada:30833 Date: 2002-11-13T20:22:54+00:00 List-Id: porton@ex-code.com (Victor Porton) wrote in message news:<3dcccf4d$0$308$bed64819@news.gradwell.net>... > > For some classes of containers e.g. for linked lists it is > possible: throw an exception if te end of list reached > (actually Ada compilers will throw these "automagically"). Yes, that's true, but the problem is that you don't always iterate to the back of the container, ie I : Iterator_Type := Find_X (First (C), Back (C)); J : Iterator_Type := Find_Not_X (I, Back (C)); begin while I /= J loop In this example iterator J probably does *not* designate the end of the container. > A good thing to have a debug version where iterators "know" > about containers. If there's interest, I could always supply checked versions, that implement the iterators and the containers with whatever extra state is necessary to check that the iterators are being used properly. > See www.STLport.org for an C++ STL with extensive debugging. Yes, I am familiar with this implementation. Perhaps we could use this as a model to build a debug version of Charles.