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,262b74f44c7f873e X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!newshub.sdsu.edu!elnk-nf2-pas!newsfeed.earthlink.net!stamper.news.pas.earthlink.net!newsread2.news.pas.earthlink.net.POSTED!a6202946!not-for-mail From: "Jeffrey R. Carter" Organization: jrcarter at acm dot org User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.12) Gecko/20050915 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: prohibit certain generic instantiations in Ada 2005 References: <1139508110.410006.28260@g14g2000cwa.googlegroups.com> <1139515341.782860.197930@f14g2000cwb.googlegroups.com> <1139581110.636535.107910@g44g2000cwa.googlegroups.com> <1139645084.563448.239040@g47g2000cwa.googlegroups.com> <1cfq4cp2jypst$.q1w29pgsumem$.dlg@40tude.net> In-Reply-To: <1cfq4cp2jypst$.q1w29pgsumem$.dlg@40tude.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Message-ID: Date: Sat, 11 Feb 2006 22:20:05 GMT NNTP-Posting-Host: 67.150.78.159 X-Complaints-To: abuse@earthlink.net X-Trace: newsread2.news.pas.earthlink.net 1139696405 67.150.78.159 (Sat, 11 Feb 2006 14:20:05 PST) NNTP-Posting-Date: Sat, 11 Feb 2006 14:20:05 PST Xref: g2news1.google.com comp.lang.ada:2863 Date: 2006-02-11T22:20:05+00:00 List-Id: Dmitry A. Kazakov wrote: > package Checker is > function Check (T : Float) return Float renames "+"; > end Checker; > > with Checker; use Checker; > generic > type T is private; > wth function Check (X : T) return T is <>; Actually, "is Checker.Check" is closer here to the OP's idea, but even then the user can supply another function for the Check. What the OP has posted is a template that can only be instantiated with float; that's no generic at all. -- Jeff Carter "Whatever it is, I'm against it." Horse Feathers 46