CVS difference for ai12s/ai12-0350-1.txt

Differences between 1.1 and version 1.2
Log of other versions for file ai12s/ai12-0350-1.txt

--- ai12s/ai12-0350-1.txt	2020/01/10 07:06:56	1.1
+++ ai12s/ai12-0350-1.txt	2020/03/16 03:36:30	1.2
@@ -1,8 +1,10 @@
-!standard A.18.18(22/5)                                 20-01-09  AI12-0350-1/01
+!standard A.18.18(22/5)                                 20-03-12  AI12-0350-1/02
 !standard A.18.18(67/5)
 !standard A.18.18(73/3)
 !standard A.18.32(13/5)
 !class Amendment 20-01-09
+!status Amendment 1-2012 20-03-11
+!status ARG Approved 14-0-0  20-03-11
 !status work item 20-01-09
 !status received 19-12-24
 !priority Low
@@ -19,8 +21,8 @@
 
 (1) It can be useful to Swap one holder value with another. For the 
 Indefinite_Holders, such an operation can avoid copying the element (avoiding
-any associated Adjust/Finalize calls); this cannot be done without involving
-an extra holder.
+any associated Adjust/Finalize calls); this cannot otherwise be done without 
+involving an extra holder.
 
 (2) A.18.18(73/3) is Implementation Advice that Move for an Indefinite_Holder
 should not copy the element. The rules of A.18.18 apply to 
@@ -38,20 +40,20 @@
 (1) Add after A.18.18(22/5):
 
    procedure Swap (Left, Right : in out Holder)
-      with Pre  => (if Tampering_With_The_Element_Prohibited (Left)
-                       then raise Program_Error
-                    elsif Tampering_With_The_Element_Prohibited (Right)
-                       then raise Program_Error),
+      with Pre  => ((not Tampering_With_The_Element_Prohibited (Left))
+                       or else raise Program_Error) and then
+                   ((not Tampering_With_The_Element_Prohibited (Right))
+                       or else raise Program_Error),
            Post => Is_Empty (Left) = Is_Empty (Right)'Old and then
                    Is_Empty (Right) = Is_Empty (Left)'Old;
 
 Add after A.18.18(67/5):
 
    procedure Swap (Left, Right : in out Holder)
-      with Pre  => (if Tampering_With_The_Element_Prohibited (Left)
-                       then raise Program_Error
-                    elsif Tampering_With_The_Element_Prohibited (Right)
-                       then raise Program_Error),
+      with Pre  => ((not Tampering_With_The_Element_Prohibited (Left))
+                       or else raise Program_Error) and then
+                   ((not Tampering_With_The_Element_Prohibited (Right))
+                       or else raise Program_Error),
            Post => Is_Empty (Left) = Is_Empty (Right)'Old and then
                    Is_Empty (Right) = Is_Empty (Left)'Old;
 
@@ -60,10 +62,10 @@
 
 Modify A.18.18(73/3):
 
-Move (and Swap) should not copy {any elements}[the element], and should 
+Move {and Swap} should not copy {any elements}[the element], and should 
 minimize copying of internal data structures. 
 
-(1) Add after A.18.32(13/5):
+(2) Add after A.18.32(13/5):
 
 The Implementation Advice about the Move and Swap operations is deleted for
 bounded holders; these operations can copy elements as needed.
@@ -75,6 +77,65 @@
 including any associated finalization and adjustments.
 
 !discussion
+
+
+!corrigendum A.18.18(22/3)
+
+@drepl
+@xcode<   @b<procedure> Move (Target : @b<in out> Holder; Source : @b<in out> Holder);>
+@dby
+@xcode<   @b<procedure> Move (Target : @b<in out> Holder; Source : @b<in out> Holder)
+      @b<with> Pre  =@> ((@b<not> Tampering_With_The_Element_Prohibited (Target))
+                       @b<or else raise> Program_Error) @b<and then>
+                   ((@b<not> Tampering_With_The_Element_Prohibited (Source))
+                       @b<or else raise> Program_Error),
+           Post =@> (@b<if> Target /= Source @b<then>
+                      Is_Empty (Source) @b<and then> (@b<not> Is_Empty (Target)));>
+
+@xcode<   @b<procedure> Swap (Left, Right : @b<in out> Holder)
+      @b<with> Pre  =@> ((@b<not> Tampering_With_The_Element_Prohibited (Left))
+                       @b<or else raise> Program_Error) @b<and then>
+                   ((@b<not> Tampering_With_The_Element_Prohibited (Right))
+                       @b<or else raise> Program_Error),
+           Post =@> Is_Empty (Left) = Is_Empty (Right)'Old @b<and then>
+                   Is_Empty (Right) = Is_Empty (Left)'Old;>
+
+!corrigendum A.18.18(67/3)
+
+@drepl
+@xindent<If Target denotes the same object as Source, then the operation has 
+no effect. Otherwise, the element contained by Source (if any) is removed from 
+Source and inserted into Target, replacing any preexisting content. Source is 
+empty after a successful call to Move.>
+@dby
+@xindent<If Target denotes the same object as Source, then the operation has 
+no effect. Otherwise, the element contained by Source (if any) is removed from 
+Source and inserted into Target, replacing any preexisting content.>
+
+@xcode<@b<procedure> Swap (Left, Right : @b<in out> Holder)
+   @b<with> Pre  =@> ((@b<not> Tampering_With_The_Element_Prohibited (Left))
+                    @b<or else raise> Program_Error) @b<and then>
+                ((@b<not> Tampering_With_The_Element_Prohibited (Right))
+                    @b<or else raise> Program_Error),
+        Post =@> Is_Empty (Left) = Is_Empty (Right)'Old @b<and then>
+                Is_Empty (Right) = Is_Empty (Left)'Old;>
+
+@xindent<If Left denotes the same object as Right, then the operation has no effect. 
+Otherwise, operation exchanges the elements (if any) contained by Left and Right.>
+
+!corrigendum A.18.18(73/3)
+
+@drepl
+Move should not copy the element, and should minimize copying of internal 
+data structures. 
+@dby
+Move and Swap should not copy any elements, and should minimize copying of 
+internal data structures. 
+
+!corrigendum A.18.32(0)
+
+@dinsc
+Placeholder; see conflict file for results.
 
 !ASIS
 

Questions? Ask the ACAA Technical Agent