comp.lang.ada
 help / color / mirror / Atom feed
From: christoph.grein@eurocopter.com
Subject: Re: Generics with concrete and class-wide types
Date: Mon, 31 Mar 2008 23:58:59 -0700 (PDT)
Date: 2008-03-31T23:58:59-07:00	[thread overview]
Message-ID: <7e7985bf-6d97-488e-b9cd-72ee40009477@b1g2000hsg.googlegroups.com> (raw)
In-Reply-To: 32fca8c2-dde6-4eb5-8a8c-56ab4f51a47e@i12g2000prf.googlegroups.com

This works:

package Classwide is

  function Get (Iterator: My_Stuff.My_Iterator'Class) return Integer;

  procedure Classwide_Procedure is new Some_Procedure
    (Element       => Integer,
     Iterator_Type => My_Stuff.My_Iterator'Class,
     Get           => Get);

end Classwide;
package body Classwide is

  function Get (Iterator: My_Stuff.My_Iterator'Class) return Integer
is
  begin
    return My_Stuff.Get (Iterator);
  end Get;

end Classwide;



  reply	other threads:[~2008-04-01  6:58 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-31 20:22 Generics with concrete and class-wide types Maciej Sobczak
2008-03-31 23:38 ` Adam Beneschan
2008-04-01 20:10   ` Randy Brukardt
2008-04-01 21:17     ` Adam Beneschan
2008-04-01  0:23 ` Randy Brukardt
2008-04-01  3:57   ` Eric Hughes
2008-04-01  6:58     ` christoph.grein [this message]
2008-04-01  7:22 ` Georg Bauhaus
2008-04-01  9:42 ` Dmitry A. Kazakov
2008-04-01  9:51   ` Maciej Sobczak
2008-04-01 10:53     ` Dmitry A. Kazakov
replies disabled

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