From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on ip-172-31-65-14.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-0.0 required=3.0 tests=BAYES_40,FREEMAIL_FROM, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Received: by 2002:a05:620a:601b:b0:773:a12d:a511 with SMTP id dw27-20020a05620a601b00b00773a12da511mr86526qkb.1.1695363939677; Thu, 21 Sep 2023 23:25:39 -0700 (PDT) X-Received: by 2002:a05:6870:7696:b0:1d6:b110:2f1f with SMTP id dx22-20020a056870769600b001d6b1102f1fmr3024745oab.8.1695363939373; Thu, 21 Sep 2023 23:25:39 -0700 (PDT) Path: eternal-september.org!news.eternal-september.org!border-1.nntp.ord.giganews.com!border-2.nntp.ord.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Thu, 21 Sep 2023 23:25:39 -0700 (PDT) Injection-Info: google-groups.googlegroups.com; posting-host=84.209.88.37; posting-account=bPTmZAoAAAC_6HP9XLKB9aAAxBa6BuOR NNTP-Posting-Host: 84.209.88.37 User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <837cb29b-77c2-4410-bbbb-05c38051aa6fn@googlegroups.com> Subject: What I do wrong here? From: reinert Injection-Date: Fri, 22 Sep 2023 06:25:39 +0000 Content-Type: text/plain; charset="UTF-8" Xref: news.eternal-september.org comp.lang.ada:65691 List-Id: -- Assume the following ordered_map: package n_cells1_p is new ada.containers.ordered_maps (key_type => celltype1_t, element_type => Natural); use n_cells1_p; n_cells1 : n_cells1_p.map; -- This statemanet is OK according to latest gnat (latest alire release): n_cells1(cells1(e.id).type1) := n_cells1(cells1(e.id).type1) + 1; -- But the compiler does not like this: n_cells1(cells1(e.id).type1) := @ + 1; (giving messages: error: expected type universal integer error: found private type "Ada.Containers.Ordered_Maps.Reference_Type" ... OK, I can live with the first alternative, but I would like to know... reinert