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:ad4:46f1:: with SMTP id h17mr29388880qvw.109.1561454544875; Tue, 25 Jun 2019 02:22:24 -0700 (PDT) X-Received: by 2002:a05:6830:15cd:: with SMTP id j13mr2896025otr.110.1561454544635; Tue, 25 Jun 2019 02:22:24 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!news.dns-netz.com!news.freedyn.net!newsreader4.netcologne.de!news.netcologne.de!peer01.ams1!peer.ams1.xlned.com!news.xlned.com!peer01.am4!peer.am4.highwinds-media.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!m24no3048093qtm.0!news-out.google.com!e20ni52qta.0!nntp.google.com!m24no3048092qtm.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Tue, 25 Jun 2019 02:22:24 -0700 (PDT) In-Reply-To: <06d8a01b-38ed-4c66-97e0-c2ee5073a0a3@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=176.11.19.13; posting-account=uulyKwoAAAA86DO0ODu--rZtbje8Sytn NNTP-Posting-Host: 176.11.19.13 References: <187147dc-94fe-4019-bc42-5b214db452db@googlegroups.com> <06d8a01b-38ed-4c66-97e0-c2ee5073a0a3@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <2d66afde-4233-473b-96f3-4557e6ee0e69@googlegroups.com> Subject: Re: recursive map specification From: Egil H H Injection-Date: Tue, 25 Jun 2019 09:22:24 +0000 Content-Type: text/plain; charset="UTF-8" X-Received-Bytes: 2663 X-Received-Body-CRC: 2418271768 Xref: reader01.eternal-september.org comp.lang.ada:56752 Date: 2019-06-25T02:22:24-07:00 List-Id: 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