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,243dc2fb696a49cd X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!news.glorb.com!news.tele.dk!not-for-mail Sender: malo@0x50a5b1a2.boanxx18.adsl-dhcp.tele.dk Newsgroups: comp.lang.ada Subject: Re: Ada Popularity: Comparison of Ada/Charles with C++ STL (and Perl) References: <11b4d.3849$d5.30042@newsb.telia.net> <1096033431.100639@master.nyc.kbcfp.com> From: Mark Lorenzen Date: 24 Sep 2004 19:47:12 +0200 Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Organization: TDC Totalloesninger NNTP-Posting-Host: 80.165.177.162 X-Trace: 1096048032 dtext02.news.tele.dk 159 80.165.177.162:24200 X-Complaints-To: abuse@post.tele.dk Xref: g2news1.google.com comp.lang.ada:4121 Date: 2004-09-24T19:47:12+02:00 List-Id: Hyman Rosen writes: > Matthew Heaney wrote: > > Note, however, that the index operator isn't completely benign. In > > fact, the index operator for map gets its own entry in Effective STL. > > One of the really annoying features of this operator is that due to > its behavior of creating the element if not already present, there is > no const version of the operator, and so you cannot use the natural > indexing syntax on a const map. Absolutely. I actually just learned this today while reading the STL reference manual a bit more carefully than just browsing it, and I was surprised about this fact. > > There have been many requests for a const version that throws an > exception if the element is not present, but you know how language > standardization committees are. Which is why I am a bit worried that AI 302 only defines the minimal set of operations. Regards, - Mark Lorenzen