comp.lang.ada
 help / color / mirror / Atom feed
From: Georg Bauhaus <rm.dash-bauhaus@futureapps.de>
Subject: Re: Access to generic formal parameters in an generic package instantiation
Date: Tue, 31 Jul 2012 18:50:52 +0200
Date: 2012-07-31T18:50:47+02:00	[thread overview]
Message-ID: <50180ce7$0$6574$9b4e6d93@newsspool3.arcor-online.net> (raw)
In-Reply-To: <597cbe39-60e5-4ac3-bbb6-71b03c57d5b3@googlegroups.com>

On 31.07.12 17:29, Adam Beneschan wrote:
>>     package Test_1 is new Ops (Int, Int, Int, Two, Two);
>> > --!GNAT!   package Test_2 is new Ops (Int, Int, Chr, Two, C);
> GNAT gets a bug box here, but you do realize that the instantiation is illegal, right?  T2 is supposed to be derived from T1, but Chr is not derived from Int.  I'm sure you probably realize this, but it's not clear from your post what you're trying to show.

Yes, I had hoped that GNAT, like ObjectAda, would say that
at compile time, i.e. whether I can instantiate the generic
with the two types, or that they are too different, in a sense.
I thought that involving a number of things tested at compile
time could remotely resemble testing (type related?) things
like is done when using C++ templates.




      reply	other threads:[~2012-08-06 14:44 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-29 18:16 Access to generic formal parameters in an generic package instantiation Florian Weimer
2012-07-29 19:36 ` Dmitry A. Kazakov
2012-07-29 21:31   ` Florian Weimer
2012-07-30 18:37     ` Adam Beneschan
2012-07-30 18:33 ` Adam Beneschan
2012-07-31  7:48 ` Georg Bauhaus
2012-07-31 15:29   ` Adam Beneschan
2012-07-31 16:50     ` Georg Bauhaus [this message]
replies disabled

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