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,56131a5c3acc678e X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-12-07 19:44:24 PST Path: archiver1.google.com!news2.google.com!newsfeed2.dallas1.level3.net!news.level3.com!news-out.visi.com!petbe.visi.com!newshosting.com!news-xfer2.atl.newshosting.com!diablo.voicenet.com!cycny01.gnilink.net!cyclone1.gnilink.net!spamkiller2.gnilink.net!nwrdny01.gnilink.net.POSTED!53ab2750!not-for-mail From: Hyman Rosen User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5) Gecko/20031008 Thunderbird/0.3 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Question about OO programming in Ada References: <5JmdnUF_9o_ABE-iRTvUrg@rapidnet.com> In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Message-ID: Date: Mon, 08 Dec 2003 03:44:22 GMT NNTP-Posting-Host: 162.84.211.17 X-Complaints-To: abuse@verizon.net X-Trace: nwrdny01.gnilink.net 1070855062 162.84.211.17 (Sun, 07 Dec 2003 22:44:22 EST) NNTP-Posting-Date: Sun, 07 Dec 2003 22:44:22 EST Xref: archiver1.google.com comp.lang.ada:3213 Date: 2003-12-08T03:44:22+00:00 List-Id: Peter C. Chapin wrote: > I believe there is some discussion about lifting the restriction on > floating point template parameters in the next edition of the C++ > standard. Of course it remains to be seen if that is done or not. The issue with regards to floating-point template parameters has to do with C++'s template model. In C++, each use of a template with identical parameters refers to the same template, unlike Ada, where each instantiation is separate. Furthermore, template parameters can be (constant) expressions. Thus, allowing flaoting-point template parameters would have required defining a computational model for deciding when two instantiations were identical. Instead, the choice was made to not allow them at all. For example, given template struct x { static int a; }; template int x::a; x<1.0> x1; x<1.0/2.0 + 1.0/2.0> x2; x<1.0/3.0 + 1.0/3.0 + 1.0/3.0> x3; what can we say about x1::a, x2::a, and x3::a? Do they all becessarily refer to the same variable. or not?