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,a327d56b3d5e9a4 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-11-12 08:59:32 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!hammer.uoregon.edu!skates!not-for-mail From: Stephen Leake Newsgroups: comp.lang.ada Subject: Re: Booch: iterator invalidation Date: 12 Nov 2002 11:50:19 -0500 Organization: NASA Goddard Space Flight Center (skates.gsfc.nasa.gov) Message-ID: References: <3dcbb4e4$0$299$bed64819@news.gradwell.net> NNTP-Posting-Host: anarres.gsfc.nasa.gov Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: skates.gsfc.nasa.gov 1037120475 27374 128.183.235.92 (12 Nov 2002 17:01:15 GMT) X-Complaints-To: usenet@news.gsfc.nasa.gov NNTP-Posting-Date: 12 Nov 2002 17:01:15 GMT User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Xref: archiver1.google.com comp.lang.ada:30764 Date: 2002-11-12T17:01:15+00:00 List-Id: Simon Wright writes: > > It also would be great to have the debug version of Booch, checking > > validity of iterators and raising an exception. With GNAT it can be > > done as in C by #ifdef/#endif preprocessor directives (assigning a > > long (may be 64, 128, or 256 bytes) counter incrementing on each > > invalidation to each container and analogous counters to iterators > > and comparing these counters). > > I am not going to include GNAT-specific stuff in the BCs if I can help > it (and if there are any such I will do my best to remove them, just > let me know!). I believe "pragma Assert" is supported by all major Ada compilers at this time; that could be used to give a good "debug version". -- -- Stephe