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.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,daf6d89212a75f42 X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!proxad.net!feeder1-2.proxad.net!feeder.erje.net!news.osn.de!diablo1.news.osn.de!noris.net!newsfeed.arcor.de!newsspool1.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: Using a generic instance to implement a public subprogram? Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: <47a609b8$0$23664$4d3efbfe@news.sover.net> <47a615cc$1_4@news.bluewin.ch> <47a61a1f$0$23713$4d3efbfe@news.sover.net> Date: Sun, 3 Feb 2008 21:37:21 +0100 Message-ID: <1dhdhjmg29zhe.atsqq55no8ip.dlg@40tude.net> NNTP-Posting-Date: 03 Feb 2008 21:37:23 CET NNTP-Posting-Host: 4cd6a813.newsspool3.arcor-online.net X-Trace: DXC=85 On Sun, 03 Feb 2008 14:46:23 -0500, Peter C. Chapin wrote: > Gautier wrote: > >> No idea whether GNAT is right or not, but the following works [...] > Cool. I'll give that a try. Providing an implementation through renaming is 100% legal. > So it seems like the instantiation is regarded as a different thing than > the subprogram mentioned in the specification. Yes "A generic_instantiation declares an instance; it is equivalent to the instance declaration (a package_declaration or subprogram_declaration) immediately followed by the instance body, both at the place of the instantiation." (RM 12.3) Because an instantiation is both a declaration and the implementation of, it cannot serve as an implementation of anything else. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de