From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,9ce5fb49dc74582f X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!news3.google.com!news.glorb.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: "Alex R. Mosteo" Newsgroups: comp.lang.ada Subject: Re: generic question Date: Mon, 20 Nov 2006 11:35:12 +0100 Message-ID: <4sdejbFuovi3U1@mid.individual.net> References: <1163959439.299036.129940@e3g2000cwe.googlegroups.com> <87mz6nnt4v.fsf@ludovic-brenta.org> <20061119202320.19149a2f@cube.tz.axivion.com> <4560D5BE.5060508@obry.net> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8Bit X-Trace: individual.net d2RwkdDiGRzdhbBz1Sp17AkLLcazKJ1xgGuqCUdeOWoLQpHJ4= User-Agent: KNode/0.10.4 Xref: g2news2.google.com comp.lang.ada:7577 Date: 2006-11-20T11:35:12+01:00 List-Id: Pascal Obry wrote: > Stefan Bellon a �crit : >> Or, since you are referring to the Ada 2005 container classes anyway, >> using Ada 2005 and anonymous access: >> >> generic >> type T is private; >> package P is >> type Node is record >> Data : T; >> Prev : access Node; >> Next : access Node; >> end record; >> end P; > > You probably don't want "access Node" here as you won't be able to > deallocate such pointer. There is no way to instantiate > Unchecked_Conversion with an anonymous access type. This is something I > found quite irritating in Ada 2005. Isn't enough to have a wrapper access type at the point of deallocation? Or are some scope rules preventing this?