comp.lang.ada
 help / color / mirror / Atom feed
* Declaring private packages to instantiate generics?
@ 2012-05-16 14:21 Markus Schöpflin
  2012-05-16 14:36 ` Adam Beneschan
  0 siblings, 1 reply; 7+ messages in thread
From: Markus Schöpflin @ 2012-05-16 14:21 UTC (permalink / raw)


I just found myself wanting to write the following code, which Gnat doesn't like:

---%<---
package FOO is
   procedure P;
end FOO;

package body FOO is
   package BAR is new SOME_GENERIC_PACKAGE;
   procedure P is new BAR.P;
end FOO;
--->%---

Can I somehow provide the body of P without writing a procedure which just 
forwards to an instantiation of BAR.P, IOW without having to write:

---%<---
package body FOO is
   package BAR is new SOME_GENERIC_PACKAGE;
   procedure BAR_P is new BAR.P;
   procedure P is begin BAR_P; end;
end FOO;
--->%---

Regards,
Markus



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2012-05-21 15:51 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-16 14:21 Declaring private packages to instantiate generics? Markus Schöpflin
2012-05-16 14:36 ` Adam Beneschan
2012-05-16 14:45   ` Markus Schöpflin
2012-05-17  1:24     ` Shark8
2012-05-17  3:37   ` Adam Beneschan
2012-05-21  8:06     ` Markus Schöpflin
2012-05-21 15:51       ` Simon Wright

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox