aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/libgnat/a-convec.ads
diff options
context:
space:
mode:
authorBob Duff <duff@adacore.com>2020-06-12 18:24:52 -0400
committerPierre-Marie de Rodat <derodat@adacore.com>2020-07-27 04:05:15 -0400
commit1e29b5465e4d8dc30cea2ff2677294fbcecd0f21 (patch)
tree40a3eff789d5be98873ae445f04bcc19a828f6b7 /gcc/ada/libgnat/a-convec.ads
parent7f5c0f328eced560a204bb8e3eae0d45795dd235 (diff)
downloadgcc-1e29b5465e4d8dc30cea2ff2677294fbcecd0f21.zip
gcc-1e29b5465e4d8dc30cea2ff2677294fbcecd0f21.tar.gz
gcc-1e29b5465e4d8dc30cea2ff2677294fbcecd0f21.tar.bz2
[Ada] Ada2020: AI12-0304 Put_Image attrs of lang-def types
gcc/ada/ * libgnat/s-rannum.ads, libgnat/s-rannum.adb: Add Put_Image. This will be inherited by the language-defined packages Ada.Numerics.Discrete_Random and Ada.Numerics.Float_Random. * libgnat/a-convec.ads, libgnat/a-convec.adb: Add Put_Image. * libgnat/s-putima.ads: Add pragma Preelaborate, so this can be imported into containers packages. * libgnat/s-putima.adb: Move Digit to private part; otherwise reference to Base is illegal in Preelaborate generic. * exp_put_image.adb (Build_Record_Put_Image_Procedure): Use the base type.
Diffstat (limited to 'gcc/ada/libgnat/a-convec.ads')
-rw-r--r--gcc/ada/libgnat/a-convec.ads6
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/ada/libgnat/a-convec.ads b/gcc/ada/libgnat/a-convec.ads
index 7b2e176..a12e456 100644
--- a/gcc/ada/libgnat/a-convec.ads
+++ b/gcc/ada/libgnat/a-convec.ads
@@ -36,6 +36,7 @@ with Ada.Iterator_Interfaces;
with Ada.Containers.Helpers;
private with Ada.Finalization;
private with Ada.Streams;
+private with Ada.Strings.Text_Output;
-- The language-defined generic package Containers.Vectors provides private
-- types Vector and Cursor, and a set of operations for each type. A vector
@@ -696,7 +697,10 @@ private
Elements : Elements_Access := null;
Last : Extended_Index := No_Index;
TC : aliased Tamper_Counts;
- end record;
+ end record with Put_Image => Put_Image;
+
+ procedure Put_Image
+ (S : in out Ada.Strings.Text_Output.Sink'Class; V : Vector);
overriding procedure Adjust (Container : in out Vector);
overriding procedure Finalize (Container : in out Vector);