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=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no 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!postnews.google.com!h54g2000cwb.googlegroups.com!not-for-mail From: "markww" Newsgroups: comp.lang.ada Subject: Re: generic question Date: 20 Nov 2006 13:16:21 -0800 Organization: http://groups.google.com Message-ID: <1164057381.185544.143140@h54g2000cwb.googlegroups.com> References: <1163959439.299036.129940@e3g2000cwe.googlegroups.com> <87mz6nnt4v.fsf@ludovic-brenta.org> <20061119202320.19149a2f@cube.tz.axivion.com> <4560D5BE.5060508@obry.net> <4sdejbFuovi3U1@mid.individual.net> <4561DFF8.5000904@obry.net> <4se99nFv3ba7U1@mid.individual.net> NNTP-Posting-Host: 67.154.89.221 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1164057386 16634 127.0.0.1 (20 Nov 2006 21:16:26 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Mon, 20 Nov 2006 21:16:26 +0000 (UTC) In-Reply-To: <4se99nFv3ba7U1@mid.individual.net> User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727),gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: h54g2000cwb.googlegroups.com; posting-host=67.154.89.221; posting-account=cNKOMg0AAADT2ug8oGSYYXo8bsDvrHzw Xref: g2news2.google.com comp.lang.ada:7588 Date: 2006-11-20T13:16:21-08:00 List-Id: Hi all, I was planning on having each node use the same generic type once instantiated. I am still new with Ada, but thought it would work similarly to C++: vector vMyVector; now this instance of the vector can only contain type CMyClassType. Thanks, Mark On Nov 20, 1:10 pm, "Alex R. Mosteo" wrote: > Pascal Obry wrote: > > Alex R. Mosteo a =E9crit : > >> Isn't enough to have a wrapper access type at the point of deallocatio= n? > >> Or are some scope rules preventing this? > > > Yes and no. The anonymous access types and named access types won't use > > the same memory pool. So doing this will not be portable. I think it > > will work with current compilers though...If I'm not mistaken, point 13= .11.2(16) would make it not even not portable > but indeed erroneous. Unless you use a named access type for the initial > allocation and the final deallocation. Admittedly I'm not very sure of any > of this.