From: "Markus Schöpflin" <no.spam@spam.spam>
Subject: Declaring private packages to instantiate generics?
Date: Wed, 16 May 2012 16:21:24 +0200
Date: 2012-05-16T16:21:24+02:00 [thread overview]
Message-ID: <jp0d51$q7e$1@speranza.aioe.org> (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
next reply other threads:[~2012-05-16 14:21 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-16 14:21 Markus Schöpflin [this message]
2012-05-16 14:36 ` Declaring private packages to instantiate generics? 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
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox