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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,38fc011071df5a27 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-05-30 10:22:26 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!nntp.abs.net!uunet!dca.uu.net!ash.uu.net!spool0901.news.uu.net!spool0902.news.uu.net!not-for-mail Date: Fri, 30 May 2003 13:22:24 -0400 From: Hyman Rosen User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5a) Gecko/20030529 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Ideas for Ada 200X References: <6a90b886.0305262344.1d558079@posting.google.com> <3ED41344.7090105@spam.com> <3ED46D81.FF62C34F@0.0> <3ED46E07.4340CABC@0.0> <3ED4F3FD.A0EF7079@alfred-hilscher.de> <1138545.LxB10ZPFul@linux1.krischik.com> <12407013.TRm0SXE9Zq@linux1.krischik.com> <1054301559.667054@master.nyc.kbcfp.com> In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Organization: KBC Financial Products Message-ID: <1054315344.183039@master.nyc.kbcfp.com> Cache-Post-Path: master.nyc.kbcfp.com!unknown@nightcrawler.nyc.kbcfp.com X-Cache: nntpcache 3.0.1 (see http://www.nntpcache.org/) NNTP-Posting-Host: 204.253.250.10 X-Trace: 1054315345 15240 204.253.250.10 Xref: archiver1.google.com comp.lang.ada:38123 Date: 2003-05-30T13:22:24-04:00 List-Id: Stephen Leake wrote: > You seem to be implying that "foo++" means something other than "foo = > foo + 1" in C++. Hmm. Quoting "The C++ Programming Language, Special > Edition" by Stroustrup, section 6.2.5: He's talking about the effect of these operators on built-in types. But you are permitted to define ++ and -- operators for your own types as well, and then the semantics are what you want. The C++ standard library defines ++ and -- operators for its iterators, with the natural meaning of move to the next or previous item. It also defines adding integers to iterators, but only for random access iterators where the addition takes constant time. For iterators which would take linear time, these operations are not defined.