comp.lang.ada
 help / color / mirror / Atom feed
From: Mark Lorenzen <mark.lorenzen@gmail.com>
Subject: Question regarding example code in AI12-0140
Date: Thu, 30 Oct 2014 08:59:30 -0700 (PDT)
Date: 2014-10-30T08:59:30-07:00	[thread overview]
Message-ID: <f7645ba6-7b61-4337-adec-77954318e0d6@googlegroups.com> (raw)

Hello

In AI-0140 the following example code is given:

with Ada.Unchecked_Deallocation;

package UNC is

   type My_String (<>) is limited private;
   type My_String_Access is access My_String;
private
   type My_String is new String;
   procedure Free is new
     Ada.Unchecked_Deallocation (My_String, My_String_Access);

end UNC;

The AI discusses if this is legal Ada or not.

I have never used nor seen a formal generic type used in this way, where the full view of the type seems to strengthen the partial view. Can anyone enlighten me to what the intention of the author could be?

Regards,

Mark L


             reply	other threads:[~2014-10-30 15:59 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-30 15:59 Mark Lorenzen [this message]
2014-10-30 16:21 ` Question regarding example code in AI12-0140 Adam Beneschan
2014-10-31 10:11   ` Mark Lorenzen
2014-10-31 19:40 ` AdaMagica
2014-11-01 15:31   ` Brad Moore
2014-11-08  3:58   ` Randy Brukardt
2014-11-08 19:20     ` AdaMagica
replies disabled

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