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=unavailable autolearn_force=no version=3.4.4 Path: border1.nntp.dca3.giganews.com!backlog3.nntp.dca3.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!feeder.erje.net!eu.feeder.erje.net!newsreader4.netcologne.de!news.netcologne.de!xlned.com!feeder7.xlned.com!npeer.de.kpn-eurorings.net!npeer-ng0.de.kpn-eurorings.net!newsfeed.arcor.de!newsspool3.arcor-online.net!news.arcor.de.POSTED!not-for-mail Date: Thu, 01 May 2014 11:32:30 +0200 From: Georg Bauhaus User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: How to declare a generic formal type "covered" by another? References: In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Message-ID: <536214ae$0$6715$9b4e6d93@newsspool2.arcor-online.net> Organization: Arcor NNTP-Posting-Date: 01 May 2014 11:32:30 CEST NNTP-Posting-Host: fc627d94.newsspool2.arcor-online.net X-Trace: DXC=XNjD\\6eVm^U6b:FjPaGjQA9EHlD; 3YcR4Fo<]lROoRQ8kFd2bk^PCY\c7>ejVX6@mYliOPa7R8XWj?i2007W X-Complaints-To: usenet-abuse@arcor.de X-Original-Bytes: 2206 Xref: number.nntp.dca.giganews.com comp.lang.ada:186182 Date: 2014-05-01T11:32:30+02:00 List-Id: On 01/05/14 08:54, Natasha Kerensikova wrote: > Is it possible, or am I hitting a limit of Ada generics? For what it's worth, the generic is requesting a formal type T, but not T's "construction facilities". To assume, then, that the generic should be able to properly construe objects of type TF seems misguided. (The in-place construction cannot incidentally "rectify" the structure of the solution, I think. The split remains.) Approaching the subject of opaque automatic memory management is ambitious, in particular if using the same approach for different kinds of type with the help of a generic: an "adequately declared" formal of Allocate is by its nature a client-side thing here, it cannot be provided by the generic, I think. Since your specific problems seem to be about the two kinds of type Storage_Element_Array and Root_Stream_Type'Class only, I wonder if you could just address these, more specifically?