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,703c4f68db81387d X-Google-Thread: 109fba,703c4f68db81387d X-Google-Attributes: gid103376,gid109fba,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!z14g2000cwz.googlegroups.com!not-for-mail From: "jimmaureenrogers@worldnet.att.net" Newsgroups: comp.lang.ada,comp.lang.c++ Subject: Re: Teaching new tricks to an old dog (C++ -->Ada) Date: 24 Mar 2005 11:41:14 -0800 Organization: http://groups.google.com Message-ID: <1111693274.369671.86470@z14g2000cwz.googlegroups.com> References: <1110361741.551255@athnrd02> <422edaec$0$26554$9b4e6d93@newsread4.arcor-online.net> <1111464133.508323@athnrd02> <423fe9df$0$11476$9b4e6d93@newsread2.arcor-online.net> <1111521825.653841@athnrd02> <424094b0$0$11481$9b4e6d93@newsread2.arcor-online.net> <1111568404.687226@athnrd02> <1111572591.296439@athnrd02> <1111574207.72969@athnrd02> <42414f88$0$9217$9b4e6d93@newsread4.arcor-online.net> <1111576802.823362@athnrd02> <1111577078.934620@athnrd02> <1111586334.958702.249050@o13g2000cwo.googlegroups.com> <1111608867.922129@athnrd02> NNTP-Posting-Host: 209.194.156.4 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: posting.google.com 1111693278 17034 127.0.0.1 (24 Mar 2005 19:41:18 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 24 Mar 2005 19:41:18 +0000 (UTC) User-Agent: G2/0.2 Complaints-To: groups-abuse@google.com Injection-Info: z14g2000cwz.googlegroups.com; posting-host=209.194.156.4; posting-account=SqOfxAwAAAAkL81YAPGH1JdBwpUXw9ZG Xref: g2news1.google.com comp.lang.ada:9928 comp.lang.c++:47113 Date: 2005-03-24T11:41:14-08:00 List-Id: Pascal Obry wrote: > Jim Rogers writes: > > > One Ada feature that cannot be implemented through any container library > > is the ability to define a range-restricted floating point type. You can > > do this in C++, but not through the use of a template. Templates cannot > > take floating point values as parameters. > > Is that still true ? I have never understood why there was such > restriction... I believe this is still true. I hope I will be corrected by a C++ expert if I am wrong. My understanding is that C++ cannot rely on a particular floating point representation across platforms. This inability to define type representation appears to make template parameter instantiation difficult for C++. I am guessing that this is a side-effect of the C and C++ type system for primitive types, where the type is very strongly related to its physical representation. Jim Rogers