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-Thread: 103376,a6fe9ef21ba269dc X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!newsfeed2.dallas1.level3.net!news.level3.com!bloom-beacon.mit.edu!newsswitch.lcs.mit.edu!nntp.TheWorld.com!not-for-mail From: Robert A Duff Newsgroups: comp.lang.ada Subject: Re: Ada Smileys in C++ lib Conversion Date: Mon, 16 Aug 2010 18:53:03 -0400 Organization: The World Public Access UNIX, Brookline, MA Message-ID: References: <9b88e5a4-c588-4997-ad5c-2efa216fe4f4@a4g2000prm.googlegroups.com> <95tc66hjv3stdk0nhdv9o46e5l2ecdog5j@4ax.com> <15cdcb9e-3747-48e3-9be0-8829dfbcc3c8@w30g2000yqw.googlegroups.com> <4915efdd-46ba-436b-b989-6067ce5a03bf@i31g2000yqm.googlegroups.com> NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: pcls6.std.com 1281999169 27615 192.74.137.71 (16 Aug 2010 22:52:49 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Mon, 16 Aug 2010 22:52:49 +0000 (UTC) User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.3 (irix) Cancel-Lock: sha1:Y9epZTqTyR31TG1nq0buMSo9gOE= Xref: g2news1.google.com comp.lang.ada:13435 Date: 2010-08-16T18:53:03-04:00 List-Id: Brian Drummond writes: > On Mon, 16 Aug 2010 05:39:34 -0700 (PDT), Maciej Sobczak > wrote: >>So, there is a difference between a "constant expression" (roughly >>equivalent to Ada's "static expression") and a "const object". >>Array bounds require constant expression. > > So we have - even in C++ - a const object that cannot be used > where a constant expression is required. Seems to me Ada and C++ are the same here. It's the different terminology that's confusing. In Ada, a "constant" object initialized by a user-defined function call cannot be used in a "static" expression. In C++, a "const" object initialized by a user-defined function call cannot be used in a "constant" expression. Same thing, different words. C is different from both C++ and Ada in this area. - Bob