From: Blady <p.p11@orange.fr>
Subject: New aggregates with Ada 2022.
Date: Sun, 19 Jun 2022 09:59:16 +0200 [thread overview]
Message-ID: <t8ml0l$1vo2$1@gioia.aioe.org> (raw)
Hello,
Following the example section of RM Ada 2022 § 4.3.5 Container
Aggregate, I want to try map aggregates:
453. type Map_Type is private
454. with Aggregate => (Empty => Empty_Map,
455. Add_Named => Add_To_Map);
456.
457. procedure Add_To_Map (M : in out Map_Type; Key : in Integer;
Value : in String);
458.
459. Empty_Map : constant Map_Type;
... -- End of example code
482. private
...
488. type Map_Type is array (1..10) of String (1..10);
489.
490. procedure Add_To_Map (M : in out Map_Type; Key : in Integer;
Value : in String) is null;
491. Empty_Map : constant Map_Type := (1..10 => (1..10 => ' '));
GNAT 12 reports:
aarm_202x_ch04.adb:491:40: error: container aggregate must use [], not ()
aarm_202x_ch04.adb:491:42: error: choice must be static
The first error seems to say that even Map_Type full view is known in
the private part I can't use assignment with genuine array aggregates.
It is a legal feature or GNAT is puzzled?
Is there an other mean to assign array aggregates?
I can't really figure out the meaning of the second error.
Any idea?
Thanks Pascal.
next reply other threads:[~2022-06-19 7:59 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-19 7:59 Blady [this message]
2022-06-19 14:15 ` New aggregates with Ada 2022 Simon Wright
2022-06-20 19:36 ` Blady
2022-06-20 22:01 ` Simon Wright
2022-06-20 21:47 ` Randy Brukardt
2022-06-20 22:18 ` Dmitry A. Kazakov
2022-06-21 23:28 ` Randy Brukardt
2022-06-22 9:04 ` Dmitry A. Kazakov
2022-06-23 1:06 ` Randy Brukardt
2022-06-23 9:32 ` Dmitry A. Kazakov
2022-06-23 10:53 ` G.B.
2022-06-24 1:21 ` Randy Brukardt
2022-06-24 1:24 ` Randy Brukardt
2022-06-24 6:50 ` Dmitry A. Kazakov
2022-06-25 3:13 ` Randy Brukardt
2022-06-25 8:50 ` Dmitry A. Kazakov
2022-06-27 21:37 ` Randy Brukardt
2022-06-28 5:36 ` Niklas Holsti
2022-06-29 4:01 ` Randy Brukardt
2022-06-29 8:30 ` Jeffrey R.Carter
2022-06-29 9:04 ` Dmitry A. Kazakov
2022-06-30 5:03 ` Randy Brukardt
2022-06-30 8:44 ` Dmitry A. Kazakov
2022-06-29 11:06 ` Niklas Holsti
2022-06-29 12:53 ` Jeffrey R.Carter
2022-06-30 5:07 ` Randy Brukardt
2022-06-30 5:14 ` Randy Brukardt
2022-06-30 8:31 ` Marius Amado-Alves
2022-07-01 5:20 ` Randy Brukardt
2022-06-30 10:30 ` Jeffrey R.Carter
2022-06-30 15:48 ` Marius Amado-Alves
2022-06-30 16:39 ` Jeffrey R.Carter
2022-07-01 0:07 ` Marius Amado-Alves
2022-06-28 7:52 ` Dmitry A. Kazakov
2022-06-29 4:07 ` Randy Brukardt
2022-06-29 7:24 ` Dmitry A. Kazakov
2022-06-30 5:00 ` Randy Brukardt
2022-06-21 23:39 ` Randy Brukardt
2022-06-22 8:26 ` Dmitry A. Kazakov
2022-06-23 1:10 ` Randy Brukardt
2022-06-23 9:32 ` Dmitry A. Kazakov
2022-06-20 22:10 ` Jesper Quorning
2022-06-20 22:59 ` Jesper Quorning
2022-06-21 23:20 ` Randy Brukardt
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox