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 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,52d73309a1322d28 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-05-31 14:00:27 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!syros.belnet.be!news.belnet.be!uni-erlangen.de!news-nue1.dfn.de!newsfeed.r-kom.de!eusc.inter.net!news.eusc.inter.net!boavista.snafu.de!news From: Michael Erdmann Newsgroups: comp.lang.ada Subject: Re: Q:Usage of storage Pools Date: Sat, 31 May 2003 22:50:23 +0200 Organization: [Posted via] Inter.net Germany GmbH Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Trace: news.eusc.inter.net 1054414826 15293 213.73.70.88 (31 May 2003 21:00:26 GMT) X-Complaints-To: abuse@eusc.inter.net User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3) Gecko/20030312 X-Accept-Language: en-us, en In-Reply-To: Xref: archiver1.google.com comp.lang.ada:38242 Date: 2003-05-31T22:50:23+02:00 List-Id: Robert A Duff wrote: > Michael Erdmann writes: > ................. >> >>package List is >> >> type List_Element_Type; >> type List_Element_Access is access List_Element_Type; >> >> type List_Element_Type is record >> Next : List_Element_Access := null; >> end record; >> >> package Element_Pool is new Pool( Pool_Data_Type => List_Element_Type ); >> >> Storage : Element_Pool.Object; >> for List_Element_Access'Storage_Pool use Storage; >> >>end List; >> >>with the error ....................... > > > You can't put the "for..." after a generic instantiation. > You can't put it before the instantiation, since it refers > to the instance. > > Why do you want to pass the type into the pool generic like that? > To know its size and alignment? I simply want to store a list nodes of one kine in a special memory pool with special features. > > You might be able to pass this info to the pool as discriminants, > instead. > > - Bob