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=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.50.23.68 with SMTP id k4mr7219232igf.10.1458479905361; Sun, 20 Mar 2016 06:18:25 -0700 (PDT) X-Received: by 10.182.112.202 with SMTP id is10mr305513obb.7.1458479905298; Sun, 20 Mar 2016 06:18:25 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!news.glorb.com!av4no1396928igc.0!news-out.google.com!pn7ni15240igb.0!nntp.google.com!nt3no3232929igb.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Sun, 20 Mar 2016 06:18:25 -0700 (PDT) In-Reply-To: <86oaa97635.fsf@gaheris.avalon.lan> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=67.0.76.128; posting-account=lJ3JNwoAAAAQfH3VV9vttJLkThaxtTfC NNTP-Posting-Host: 67.0.76.128 References: <86oaa97635.fsf@gaheris.avalon.lan> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Confused about class-wide types From: Shark8 Injection-Date: Sun, 20 Mar 2016 13:18:25 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Xref: news.eternal-september.org comp.lang.ada:29830 Date: 2016-03-20T06:18:25-07:00 List-Id: On Sunday, March 20, 2016 at 5:16:24 AM UTC-6, Mart van de Wege wrote: > package Events is new Ada.Containers.Vectors ( Index_Type =3D> Natural= , > Element_Type =3D> Event_Ptr); If you are using Ada 2012, then you can change "Events" to Ada.Containers.I= ndefinite_Vectors with an Element_Type of Event'Class... which should, in t= urn, eliminate the need for any pointer-types in the test. (It also has the= advantage of not needing to check the vector for Null.)