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=0.4 required=5.0 tests=BAYES_00,FORGED_MUA_MOZILLA autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,18684ed750c9b60f X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.216.216.131 with SMTP id g3mr806003wep.10.1350352569348; Mon, 15 Oct 2012 18:56:09 -0700 (PDT) Path: q10ni65138172wif.0!nntp.google.com!feeder3.cambriumusenet.nl!feeder1.cambriumusenet.nl!feed.tweaknews.nl!194.109.133.85.MISMATCH!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!border4.nntp.ams.giganews.com!border2.nntp.ams.giganews.com!border3.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!news.panservice.it!feeder.erje.net!news.osn.de!diablo1.news.osn.de!noris.net!newsfeed.arcor.de!newsspool3.arcor-online.net!news.arcor.de.POSTED!not-for-mail Date: Fri, 12 Oct 2012 01:28:31 +0200 From: Georg Bauhaus User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:15.0) Gecko/20120907 Thunderbird/15.0.1 MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: How to get generic formal parameter type into base class References: <51f8461d-d362-4e5f-a188-ac96a699a211@googlegroups.com> <527f8487-a578-406c-86c3-b3b0596cda71@l32g2000yqb.googlegroups.com> In-Reply-To: Message-ID: <50775620$0$6560$9b4e6d93@newsspool4.arcor-online.net> Organization: Arcor NNTP-Posting-Date: 12 Oct 2012 01:28:32 CEST NNTP-Posting-Host: 103e7bc7.newsspool4.arcor-online.net X-Trace: DXC=J=66h>dgejV8USnVcf8i=<2WZ On 11.10.12 22:25, kevin andrew wrote: > > Thanks Adam, > Your solution is the workaround I had used. Ada is so strongly type > cast I didn't think I would be able to do what I wanted. > FYI, you can do this with C++ template classes, You can't, really. It hinges on char and int matching. Try this: struct T {}; int main() { newClass intClass; newClass charClass; ... }