Re: Generic instantiation with constrained subtype
- From: Simon Wright <simon.j.wright@xxxxxxx>
- Date: Sat, 23 Aug 2008 21:24:46 +0100
"Jeffrey R. Carter" <spam.jrcarter.not@xxxxxxxxxxxx> writes:
Simon Wright wrote:
type T is new Base with private;
type T (<>) is new Base with private;
eliminates the compiler errors. It may not be suitable for your needs,
however.
Hmm, I need to be able to say
generic
type T (<>) is new Base with private;
package G is
O : T;
end G;
Ah! I can provide an initialising value!
generic
type T (<>) is new Base with private;
V : T;
package G is
O : T := V;
end G;
A : Constrained;
package F is new G (Constrained, A);
-- and it works fine! Thanks for the help ..
.
- References:
- Generic instantiation with constrained subtype
- From: Simon Wright
- Generic instantiation with constrained subtype
- Prev by Date: Re: File output and buffering
- Next by Date: Re: File output and buffering
- Previous by thread: Generic instantiation with constrained subtype
- Index(es):
Relevant Pages
|