comp.lang.ada
 help / color / mirror / Atom feed
From: "Matthew Heaney" <matthew_heaney@acm.org>
Subject: Default equality for generic formal types
Date: 2000/02/22
Date: 2000-02-22T00:00:00+00:00	[thread overview]
Message-ID: <Fqns4.14199$O43.537287@newsread2.prod.itd.earthlink.net> (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




             reply	other threads:[~2000-02-22  0:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-02-22  0:00 Matthew Heaney [this message]
2000-02-21  0:00 ` Default equality for generic formal types R. Tim Coslet
2000-02-22  0:00   ` Andy
replies disabled

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