comp.lang.ada
 help / color / mirror / Atom feed
* Default equality for generic formal types
@ 2000-02-22  0:00 Matthew Heaney
  2000-02-21  0:00 ` R. Tim Coslet
  0 siblings, 1 reply; 3+ messages in thread
From: Matthew Heaney @ 2000-02-22  0:00 UTC (permalink / raw)


Suppose I have a generic subprogram like this:

generic
  type Item_Type is private;
  with function Item_Eq (L, R : Item_Type)
    return Boolean is "=";
procedure Generic_Op (O : T);


Suppose further that the generic actual type is nontagged, and has
overridden its predefined equality.

To which equality does Item_Eq refer?  The overridden version, or the
predefined version?  What does that default value for Item_Eq, "=", mean
at the time of compilation of the generic?

If the client does not explicitly pass in an item equality op during the
instantiation (likely, because the type is nonlimited), then inside
Generic_Op, what does Item_Eq refer to?  Predefined equality, or the
overridding version?

Thanks in advance,
Matt




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

end of thread, other threads:[~2000-02-22  0:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-02-22  0:00 Default equality for generic formal types Matthew Heaney
2000-02-21  0:00 ` R. Tim Coslet
2000-02-22  0:00   ` Andy

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