CVS difference for ai05s/ai05-0268-1.txt

Differences between 1.2 and version 1.3
Log of other versions for file ai05s/ai05-0268-1.txt

--- ai05s/ai05-0268-1.txt	2011/11/09 06:33:39	1.2
+++ ai05s/ai05-0268-1.txt	2011/12/17 07:08:44	1.3
@@ -1,14 +1,17 @@
-!standard  4.1.5(9/3)                               11-11-08    AI05-0268-1/01
+!standard  4.1.5(0/3)                               11-12-16    AI05-0268-1/02
+!standard  4.1.6(0/3)
+!standard  5.5.2(0/3)
 !class Amendment 11-11-08
+!status Amendment 2012 11-11-11
+!status ARG Approved 8-0-0  11-11-11
 !status work item 11-11-08
 !status received 11-07-20
 !priority Low
 !difficulty Easy
-!qualifier Error
 !subject Examples in new sections of the Standard
 !summary
 
-** TBD.
+Improve the examples in new clauses in the Standard.
 
 !question
 
@@ -16,44 +19,79 @@
 
 !proposal
 
-Add the following to the example in 4.1.5:
+Add the following in front of 4.1.5(9/3):
 
-type Container is tagged limited private;  -- holds objects of type Element
+   type Barrel is tagged ...  -- holds objects of type Element
 
-C: aliased Container;
+   B: aliased Barrel;
 
-Then the calls of Find have to be updated like so:
+Replace 4.1.5(10/3) with:
 
-Find (C'Access, "grape") := Element'(...); -- Assign through a reference.
--- 
-Find (C'Access, "grape").Data.all := Element'(...);
+   function Find(B : aliased in out Barrel; Key : String) return Ref_Element;
+      -- Return a reference to an element of a barrel
 
-Add an example to 4.1.6:
+Replace 4.1.5(12-13/3) with:
 
-type Container is tagged limited private
-  with Variable_Indexing => Find;
-  -- Container is an indexable type,
-  -- Find (see 4.1.5) is the generalized indexing operation.
+   Find (B, "grape") := Element'(...); -- Assign through a reference.
 
---  equivalent:
-Find (C'Access, "grape").Data.all := Element'(...);-- (see 4.1.5) traditional call
-C.Find ("grape").Data.all := Element'(...);  -- call of prefixed view
-C.Find ("grape")          := Element'(...);  -- (see 4.1.5) implicit dereference
-C      ("grape")          := Element'(...);  -- implicit Indexing
+   -- This is equivalent to:
+   Find (B, "grape").Data.all := Element'(...);
 
+Add an example to 4.1.6 after 4.1.6(17/3):
 
-Add an example to 5.5.2:
+Examples
 
-** TBD.
+   type Indexed_Barrel is tagged ...
+     with Variable_Indexing => Find;
+     -- Indexed_Barrel is an indexable type,
+     -- Find is the generalized indexing operation.
 
+   function Find(B : aliased in out Indexed_Barrel; Key : String) return Ref_Element;
+      -- Return a reference to an element of a barrel (see 4.1.5).
+
+   IB: aliased Indexed_Barrel;
+
+   -- All of the following calls are then equivalent:
+   Find (IB,"pear").Data.all := Element'(...); -- Traditional call
+   IB.Find ("pear").Data.all := Element'(...); -- Call of prefixed view
+   IB.Find ("pear")          := Element'(...); -- Implicit dereference (see 4.1.5)
+   IB      ("pear")          := Element'(...); -- Implicit indexing and dereference
+   IB      ("pear").Data.all := Element'(...); -- Implicit indexing only
+
+
+Add an example to 5.5.2 after 5.5.2(13/3):
+
+Examples
+
+For examples of use of generalized iterators, see A.18.32 and the corresponding container
+packages in A.18.2 and A.18.3.
+
 !wording
 
-** TBD.
+(See proposal.)
 
 !discussion
+
+Any example for the generalized iterators is going to be large. We point the reader at the
+containers example rather than trying to create another example.
+
+!corrigendum 4.1.5(0)
+
+@dinsc
+
+Force a conflict; the real text is found in the conflict file.
+
+!corrigendum 4.1.6(0)
+
+@dinsc
+
+Force a conflict; the real text is found in the conflict file.
+
+!corrigendum 5.5.2(0)
+
+@dinsc
 
-The example in the containers section covers most of this material. Should we
-use a forward reference instead??
+Force a conflict; the real text is found in the conflict file.
 
 !ACATS Test
 

Questions? Ask the ACAA Technical Agent