CVS difference for ai12s/ai12-0400-1.txt
--- ai12s/ai12-0400-1.txt 2020/10/22 23:59:00 1.3
+++ ai12s/ai12-0400-1.txt 2020/12/03 05:16:28 1.4
@@ -32,7 +32,7 @@
!status received 20-10-01
!priority Low
!difficulty Easy
-!qualifier Correction
+!qualifier Error
!subject Ambiguities associated with Vector Append and container aggregates
!summary
@@ -273,6 +273,133 @@
taking a Count parameter, but without a default. This should be upward
compatible in all but the most obscure situations. We make a
corresponding change to Doubly_Linked_Lists.
+
+!comment We only have added !corrigendum sections for those paragraphs
+!comment for which they already existed.
+
+!corrigendum A.18.2(8/3)
+
+@drepl
+@xcode< @b<type> Vector @b<is tagged private>
+ @b<with> Constant_Indexing =@> Constant_Reference,
+ Variable_Indexing =@> Reference,
+ Default_Iterator =@> Iterate,
+ Iterator_Element =@> Element_Type;
+ @b<pragma> Preelaborable_Initialization(Vector);>
+@dby
+@xcode< @b<type> Vector @b<is tagged private>
+ @b<with> Constant_Indexing =@> Constant_Reference,
+ Variable_Indexing =@> Reference,
+ Default_Iterator =@> Iterate,
+ Iterator_Element =@> Element_Type,
+ Iterator_View =@> Stable.Vector,
+ Aggregate =@> (Empty =@> Empty,
+ Add_Unnamed =@> Append,
+ New_Indexed =@> New_Vector,
+ Assign_Indexed =@> Replace_Element),
+ Stable_Properties =@> (Length, Capacity,
+ Tampering_With_Cursors_Prohibited,
+ Tampering_With_Elements_Prohibited),
+ Default_Initial_Condition =@>
+ Length (Vector) = 0 @b<and then>
+ (@b<not> Tampering_With_Cursors_Prohibited (Vector)) @b<and then>
+ (@b<not> Tampering_With_Elements_Prohibited (Vector));
+ @b<pragma> Preelaborable_Initialization(Vector);>
+
+!corrigendum A.18.2(47/2)
+
+@drepl
+@xcode< @b<procedure> Append (Container : @b<in out> Vector;
+ New_Item : @b<in> Element_Type;
+ Count : @b<in> Count_Type := 1);>
+@dinst
+@xcode< @b<procedure> Append (Container : @b<in out> Vector;
+ New_Item : @b<in> Element_Type;
+ Count : @b<in> Count_Type)
+ @b<with> Pre =@> (@b<not> Tampering_With_Cursors_Prohibited (Container)
+ @b<or else raise> Program_Error) @b<and then>
+ (Length (Container) <= Maximum_Length - Count
+ @b<or else raise> Constraint_Error),
+ Post =@>
+ Length (Container)'Old + Count = Length (Container) @b<and then>
+ Capacity (Container) @>= Length (Container);>
+
+@xcode< @b<procedure> Append (Container : @b<in out> Vector;
+ New_Item : @b<in> Element_Type)
+ @b<with> Pre =@> (@b<not> Tampering_With_Cursors_Prohibited (Container)
+ @b<or else raise> Program_Error) @b<and then>
+ (Length (Container) <= Maximum_Length - 1
+ @b<or else raise> Constraint_Error),
+ Post =@> Length (Container)'Old + 1 = Length (Container) @b<and then>
+ Capacity (Container) @>= Length (Container);>
+
+!corrigendum A.18.2(175/2)
+
+@dinsa
+@xindent<Equivalent to Insert (Container, Last_Index (Container) + 1, New_Item, Count).>
+@dinss
+@xcode<@b<procedure> Append (Container : @b<in out> Vector;
+ New_Item : @b<in> Element_Type)
+ @b<with> Pre =@> (@b<not> Tampering_With_Cursors_Prohibited (Container)
+ @b<or else raise> Program_Error) @b<and then>
+ (Length (Container) <= Maximum_Length - 1
+ @b<or else raise> Constraint_Error),
+ Post =@> Length (Container)'Old + 1 = Length (Container) @b<and then>
+ Capacity (Container) @>= Length (Container);>
+
+@xindent<Equivalent to Insert (Container, Last_Index (Container) + 1, New_Item, 1).>
+
+
+!corrigendum A.18.3(6/3)
+
+@drepl
+@xcode< @b<type> List @b<is tagged private>
+ @b<with> Constant_Indexing =@> Constant_Reference,
+ Variable_Indexing =@> Reference,
+ Default_Iterator =@> Iterate,
+ Iterator_Element =@> Element_Type;
+ @b<pragma> Preelaborable_Initialization(List);>
+@dby
+@xcode< @b<type> List @b<is tagged private>
+ @b<with> Constant_Indexing =@> Constant_Reference,
+ Variable_Indexing =@> Reference,
+ Default_Iterator =@> Iterate,
+ Iterator_Element =@> Element_Type,
+ Iterator_View =@> Stable.List,
+ Aggregate =@> (Empty =@> Empty,
+ Add_Unnamed =@> Append),
+ Stable_Properties =@> (Length,
+ Tampering_With_Cursors_Prohibited,
+ Tampering_With_Elements_Prohibited),
+ Default_Initial_Condition =@>
+ Length (List) = 0 @b<and then>
+ (@b<not> Tampering_With_Cursors_Prohibited (List)) @b<and then>
+ (@b<not> Tampering_With_Elements_Prohibited (List));
+ @b<pragma> Preelaborable_Initialization(List);>
+
+!corrigendum A.18.3(23/2)
+
+@drepl
+@xcode< @b<procedure> Append (Container : @b<in out> List;
+ New_Item : @b<in> Element_Type;
+ Count : @b<in> Count_Type := 1);>
+@dby
+@xcode< @b<procedure> Append (Container : @b<in out> List;
+ New_Item : @b<in> Element_Type;
+ Count : @b<in> Count_Type)
+ @b<with> Pre =@> (@b<not> Tampering_With_Cursors_Prohibited (Container)
+ @b<or else raise> Program_Error) @b<and then>
+ (Length (Container) <= Count_Type'Last - Count
+ @b<or else raise> Constraint_Error),
+ Post =@> Length (Container)'Old + Count = Length (Container);>
+
+@xcode< @b<procedure> Append (Container : @b<in out> List;
+ New_Item : @b<in> Element_Type)
+ @b<with> Pre =@> (@b<not> Tampering_With_Cursors_Prohibited (Container)
+ @b<or else raise> Program_Error) @b<and then>
+ (Length (Container) <= Count_Type'Last - 1
+ @b<or else raise> Constraint_Error),
+ Post =@> Length (Container)'Old + 1 = Length (Container);>
!ASIS
Questions? Ask the ACAA Technical Agent