Ada Reference Manual (Ada 2022)
A.18.11 The Generic Package Containers.Indefinite_Vectors
The language-defined generic package Containers.Indefinite_Vectors provides a private type Vector and a set of operations. It provides the same operations as the package Containers.Vectors (see A.18.2), with the difference that the generic formal Element_Type is indefinite.
Static Semantics
The declaration of the generic library package Containers.Indefinite_Vectors has the same contents and semantics as Containers.Vectors except:
- The generic formal Element_Type is indefinite.
- The procedures with the profiles:
procedure Insert (Container : in out Vector;
Before : in Extended_Index;
Count : in Count_Type := 1);
Before : in Extended_Index;
Count : in Count_Type := 1);
procedure Insert (Container : in out Vector;
Before : in Cursor;
Position : out Cursor;
Count : in Count_Type := 1);
Before : in Cursor;
Position : out Cursor;
Count : in Count_Type := 1);
are omitted.
- The actual Element parameter of access subprogram Process of Update_Element may be constrained even if Element_Type is unconstrained.
- The operations "&", Append, Insert, Prepend, Replace_Element, and To_Vector that have a formal parameter of type Element_Type perform indefinite insertion (see A.18).
- The description of Tampering_With_Elements_Prohibited is replaced by:
Returns True if tampering with elements is prohibited for Container, and False otherwise.
- Tampering_With_Cursors_Prohibited is replaced by Tampering_With_Elements_Prohibited in the postcondition for the operations Reference and Constant_Reference.
- The operations Replace_Element, Reverse_Elements, and Swap, and the nested generic unit Generic_Sorting are omitted from the nested package Stable.