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,8385fc6e4bf20336 X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!b1g2000hsg.googlegroups.com!not-for-mail From: christoph.grein@eurocopter.com Newsgroups: comp.lang.ada Subject: Re: Generics with concrete and class-wide types Date: Mon, 31 Mar 2008 23:58:59 -0700 (PDT) Organization: http://groups.google.com Message-ID: <7e7985bf-6d97-488e-b9cd-72ee40009477@b1g2000hsg.googlegroups.com> References: <279b6f4f-36cf-446f-8b54-fd72b957b22f@i7g2000prf.googlegroups.com> <32fca8c2-dde6-4eb5-8a8c-56ab4f51a47e@i12g2000prf.googlegroups.com> NNTP-Posting-Host: 80.156.44.161 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: posting.google.com 1207033140 28961 127.0.0.1 (1 Apr 2008 06:59:00 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Tue, 1 Apr 2008 06:59:00 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: b1g2000hsg.googlegroups.com; posting-host=80.156.44.161; posting-account=rmHyLAoAAADSQmMWJF0a_815Fdd96RDf User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727),gzip(gfe),gzip(gfe) X-HTTP-Via: 1.1 webwasher (Webwasher 6.6.3.3150) Xref: g2news1.google.com comp.lang.ada:20700 Date: 2008-03-31T23:58:59-07:00 List-Id: This works: package Classwide is function Get (Iterator: My_Stuff.My_Iterator'Class) return Integer; procedure Classwide_Procedure is new Some_Procedure (Element => Integer, Iterator_Type => My_Stuff.My_Iterator'Class, Get => Get); end Classwide; package body Classwide is function Get (Iterator: My_Stuff.My_Iterator'Class) return Integer is begin return My_Stuff.Get (Iterator); end Get; end Classwide;