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 2002:ac8:877:: with SMTP id x52mr38024450qth.328.1561454646482; Tue, 25 Jun 2019 02:24:06 -0700 (PDT) X-Received: by 2002:a05:6830:1086:: with SMTP id y6mr5552651oto.22.1561454646134; Tue, 25 Jun 2019 02:24:06 -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!m24no3051738qtm.0!news-out.google.com!e20ni52qta.0!nntp.google.com!m24no3051731qtm.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Tue, 25 Jun 2019 02:24:05 -0700 (PDT) In-Reply-To: <2d66afde-4233-473b-96f3-4557e6ee0e69@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=87.154.194.176; posting-account=3zVVBwoAAAC7BSMfgNP7DSbqU9urpt40 NNTP-Posting-Host: 87.154.194.176 References: <187147dc-94fe-4019-bc42-5b214db452db@googlegroups.com> <06d8a01b-38ed-4c66-97e0-c2ee5073a0a3@googlegroups.com> <2d66afde-4233-473b-96f3-4557e6ee0e69@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <178758a4-3465-4df6-ac90-16e994af9089@googlegroups.com> Subject: Re: recursive map specification From: mario.blunk.gplus@gmail.com Injection-Date: Tue, 25 Jun 2019 09:24:06 +0000 Content-Type: text/plain; charset="UTF-8" Xref: reader01.eternal-september.org comp.lang.ada:56753 Date: 2019-06-25T02:24:05-07:00 List-Id: On Tuesday, June 25, 2019 at 11:22:25 AM UTC+2, Egil H H wrote: > On Tuesday, June 25, 2019 at 11:09:20 AM UTC+2, mario.b...@gmail.com wrote: > > On Tuesday, June 25, 2019 at 10:44:11 AM UTC+2, Egil H H wrote: > > > On Tuesday, June 25, 2019 at 10:21:03 AM UTC+2, mario.b...@gmail.com wrote: > > > > Hello, > > > > > > > > I want to specify a recursive map. To simplify the problem I use the example of a person and its ancestors and ancestors ... The problem does not seem special but I haven't found a solution. The approach below does not compile: > > > > > > > > type person is record > > > > name : unbounded_string; > > > > end record; > > > > > > > > package tree is new ordered_maps > > > > ( > > > > key_type => person, > > > > element_type => tree.map -- compiler error. "tree" undefined > > > > ); > > > > > > > > Any ideas ? Thanks a lot ! > > > > > > > > > Is there a reason you don't use Ada.Containers.Multiway_Trees instead? > > > > > > > > > -- > > > ~egilhh > > > > It is the first time I read about multiway_trees. Do you have a simple example ready ? Otherwise I would dig into the package docs which lack practical examples... Thanks > > > Sorry, I haven't used that package myself, but there's some additional explanation and example in the Rationale, http://www.ada-auth.org/standards/12rat/html/Rat12-8-4.html > > > -- > ~egilhh Yep, I just found that too. Thanks. Time for reading :-)