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-Received: by 2002:a5d:8b0b:: with SMTP id k11mr12917512ion.3.1552942742106; Mon, 18 Mar 2019 13:59:02 -0700 (PDT) X-Received: by 2002:a9d:7146:: with SMTP id y6mr3073005otj.213.1552942741792; Mon, 18 Mar 2019 13:59:01 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!weretis.net!feeder6.news.weretis.net!feeder.usenetexpress.com!feeder-in1.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!78no43055itl.0!news-out.google.com!l81ni63itl.0!nntp.google.com!78no43054itl.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Mon, 18 Mar 2019 13:59:01 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=176.130.29.212; posting-account=6yLzewoAAABoisbSsCJH1SPMc9UrfXBH NNTP-Posting-Host: 176.130.29.212 References: User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: How to access Vector.Index_Type? From: briot.emmanuel@gmail.com Injection-Date: Mon, 18 Mar 2019 20:59:02 +0000 Content-Type: text/plain; charset="UTF-8" Xref: reader01.eternal-september.org comp.lang.ada:55890 Date: 2019-03-18T13:59:01-07:00 List-Id: > P.S. It is a longstanding issue with visibility of formal generic > parameters. Anybody who used generics was hit by it more than once. I > don't know if anything was attempted recently to fix that. A life-hack > (that does not apply to existing packages) was/is to rename or subtype > each formal parameter of the generic: I agree with this 100%. This has been a huge issue to me when trying to work on "traits", and other use of generic packages that you want to combine with other packages. In some cases, you have access to Index_Type and sometimes not. I like to remember this by thinking "if my code doesn't know how the package was instantiated, I can access the actual parameters, but if the instance is visible can't.