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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,1dd28d5040ded1f8 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-05-10 11:57:24 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!cpk-news-hub1.bbnplanet.com!news.gtei.net!nntp.abs.net!uunet!dca.uu.net!ash.uu.net!spool0901.news.uu.net!spool0900.news.uu.net!reader0901.news.uu.net!not-for-mail Message-ID: <3CDC1811.1080005@mail.com> Date: Fri, 10 May 2002 14:57:21 -0400 From: Hyman Rosen User-Agent: Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:0.9.9+) Gecko/20020425 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Announce: Grace project site operational References: <3CDBC5E3.1010609@mail.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Organization: KBC Financial Products Cache-Post-Path: master.nyc.kbcfp.com!unknown@fixedcost.nyc.kbcfp.com X-Cache: nntpcache 2.3.3 (see http://www.nntpcache.org/) NNTP-Posting-Host: 204.253.250.10 X-Trace: 1021057043 reader1.ash.ops.us.uu.net 12150 204.253.250.10 Xref: archiver1.google.com comp.lang.ada:23863 Date: 2002-05-10T14:57:21-04:00 List-Id: Preben Randhol wrote: > I don't see what you gain by this? If the instantiated package which is passed as the generic formal package is usually but not always instantiated with a subset of the arguments used to instantiate the generic itself, it could be useful to allow the generic formal to default to a new instantiation of the usual case. In C++, for example, the standard containers all take an allocator class as a generic parameter, and this allocator class is usually, but not always, an instantiation of a standard generic allocator class on the type of the object the container will hold. It looks something like this - template< typename ElementType, typename Allocator = DefaultAllocator< ElementType > > class Vector { /* ... */ }; Most of the time, you just use Vector and let the allocator default, and sometimes you provide your own special purpose one.