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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,f2690a5e963b61b6 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!g49g2000cwa.googlegroups.com!not-for-mail From: "Dmitriy Anisimkov" Newsgroups: comp.lang.ada Subject: Re: GCC 4.0 Ada.Containers Cursor danger. Date: 16 Jul 2005 21:04:17 -0700 Organization: http://groups.google.com Message-ID: <1121573057.159416.274980@g49g2000cwa.googlegroups.com> References: <1120474891.635131.216700@g44g2000cwa.googlegroups.com> NNTP-Posting-Host: 195.162.49.9 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: posting.google.com 1121573062 24537 127.0.0.1 (17 Jul 2005 04:04:22 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Sun, 17 Jul 2005 04:04:22 +0000 (UTC) In-Reply-To: User-Agent: G2/0.2 Complaints-To: groups-abuse@google.com Injection-Info: g49g2000cwa.googlegroups.com; posting-host=195.162.49.9; posting-account=t4CEmgwAAAA8dL2naG2k3iz_rN__dZy3 Xref: g2news1.google.com comp.lang.ada:3643 Date: 2005-07-16T21:04:17-07:00 List-Id: M.Delete (C2); pragma Assert (not Has_Element (C2)); pragma Assert (not M.Contains ("two")); -- double hash overhead. Replace_Element (C, -2); -- dangling cursor << Does this behavior adequately satisfy your needs? >> No, this checking is too overhead. And my need is not in the cursors aria. I would use the procedure Include (Container : in out Map; Key : Key_Type; New_Item : Element_Type); in this cases. (this sample was based in AI302 without Include routine.) But I need some more routines without cursors. For example procedure Iterate (Container : Map; Process : not null access procedure (Key : Key_Type; Element : Element_Type; Stop : out Boolean)); analog of procedure Iterate (Container : Map; Process : not null access procedure (Position : Cursor)); but without cursor. And for every access routine with cursor there should be analog without cursors IMHO.