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,6cdf06eb7605332d X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!proxad.net!feeder2-1.proxad.net!news2-e.free.fr!not-for-mail Newsgroups: comp.lang.ada Subject: Re: Smarter Generics References: <%6uTc.592$de4.1@trndny07> <3-qdnZ79G9B02r3cRVn-pA@gbronline.com> From: Jean-Marc Bourguet Message-ID: Date: 16 Aug 2004 15:45:34 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Organization: Guest of ProXad - France NNTP-Posting-Date: 16 Aug 2004 15:45:34 MEST NNTP-Posting-Host: 62.189.36.28 X-Trace: 1092663934 news2-e.free.fr 18610 62.189.36.28:53298 X-Complaints-To: abuse@proxad.net Xref: g2news1.google.com comp.lang.ada:2752 Date: 2004-08-16T15:45:34+02:00 List-Id: Wes Groleau writes: > Frank J. Lhota wrote: > > I have seen an implementation of Generic_Elementary_Functions > in which every subprogram had an IF statement on the precision > of the formal floating point parameter. > > I suppose C++ could do this as well. C++ has specialisations (which is to say, when the template parameters are these, use this implementation, when they are those, use this other one), which would be the natural mecanism to implement such choice. Yours, -- Jean-Marc