From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Using a generic instance to implement a public subprogram?
Date: Sun, 3 Feb 2008 21:37:21 +0100
Date: 2008-02-03T21:37:23+01:00 [thread overview]
Message-ID: <1dhdhjmg29zhe.atsqq55no8ip.dlg@40tude.net> (raw)
In-Reply-To: 47a61a1f$0$23713$4d3efbfe@news.sover.net
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
next prev parent reply other threads:[~2008-02-03 20:37 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-03 18:35 Using a generic instance to implement a public subprogram? Peter C. Chapin
2008-02-03 19:27 ` Gautier
2008-02-03 19:46 ` Peter C. Chapin
2008-02-03 20:37 ` Dmitry A. Kazakov [this message]
2008-02-05 1:58 ` Randy Brukardt
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox