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,ce0900b60ca3f616 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-11-03 00:28:04 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.ems.psu.edu!news.cis.ohio-state.edu!news.maxwell.syr.edu!dispose.news.demon.net!news.demon.co.uk!demon!pogner.demon.co.uk!zap!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: List container strawman Date: 03 Nov 2001 08:09:40 +0000 Organization: Pushface Message-ID: References: <_TDE7.10572$xS6.14895@www.newsranger.com> NNTP-Posting-Host: localhost X-NNTP-Posting-Host: pogner.demon.co.uk:158.152.70.98 X-Trace: news.demon.co.uk 1004776074 nnrp-01:19197 NO-IDENT pogner.demon.co.uk:158.152.70.98 X-Complaints-To: abuse@demon.net NNTP-Posting-Date: 3 Nov 2001 08:09:40 GMT X-Newsreader: Gnus v5.7/Emacs 20.7 Xref: archiver1.google.com comp.lang.ada:15726 Date: 2001-11-03T08:09:40+00:00 List-Id: Ted Dennison writes: > In article , Mike Brenner > says... > > > >Comment 3. There is no method of putting in a garbage collector. > > *That's* the other thing I forgot! I was thinking of having a > storage pool be an optional parameter (the default being the default > storage pool). Any problems with that? I couldn't find a way of giving the parameter a default; the problem being that there's no standard way of getting at the standard storage pool. GNAT makes it visible, but warns you about using features that aren't "officially" supported. I guess one could go in for indirections using accesses or functions .. I have generic Storage : in out System.Storage_Pools.Root_Storage_Pool'Class; package BC.Containers.Collections.Unbounded is and you can get at the default pool using with System.Storage_Pools; package BC.Support.Standard_Storage is type T is access Integer; -- arbitrary subtype Pool : System.Storage_Pools.Root_Storage_Pool'Class renames T'Storage_Pool; end BC.Support.Standard_Storage; Aha! this compiles (GNAT 3.14a1), whether it is legal and works on other compilers is a different matter of course .. with System.Storage_Pools; package Default_Pool is type Pool_Access is access all System.Storage_Pools.Root_Storage_Pool'Class; type T is access Integer; Pool : System.Storage_Pools.Root_Storage_Pool'Class renames T'Storage_Pool; generic Storage : Pool_Access := Pool'Access; package G is end G; end Default_Pool;