Ada Conformity Assessment Authority      Home Conformity Assessment   Test Suite ARGAda Standard
 
Annotated Ada Reference ManualLegal Information
Contents   Index   References   Search   Previous   Next 

A.18.17 The Generic Package Containers.Indefinite_Multiway_Trees

1/3
{AI05-0136-1} The language-defined generic package Containers.Indefinite_Multiway_Trees provides a multiway tree with the same operations as the package Containers.Multiway_Trees (see A.18.10), with the difference that the generic formal Element_Type is indefinite. 

Static Semantics

2/3
{AI05-0136-1} The declaration of the generic library package Containers.Indefinite_Multiway_Trees has the same contents and semantics as Containers.Multiway_Trees except:
3/3
The generic formal Element_Type is indefinite.
4/3
The procedure with the profile: 
5/3
procedure Insert_Child (Container : in out Tree;
                        Parent    : in     Cursor;
                        Before    : in     Cursor;
                        Position  :    out Cursor;
                        Count     : in     Count_Type := 1);
6/3
is omitted.
6.a/3
Discussion: This procedure is omitted because there is no way to create a default-initialized object of an indefinite type. We considered having this routine insert an empty element similar to the empty elements of a vector, but rejected this possibility because the semantics are fairly complex and very different from the existing case. That would make it more error-prone to convert a container from a definite type to an indefinite type; by omitting the routine completely, any problems will be diagnosed by the compiler. 
7/3
The actual Element parameter of access subprogram Process of Update_Element may be constrained even if Element_Type is unconstrained.
8/4
{AI12-0035-1} The operations Append_Child, Insert_Child, Prepend_Child, and Replace_Element that have a formal parameter of type Element_Type perform indefinite insertion (see A.18).

Extensions to Ada 2005

8.a/3
{AI05-0136-1} The generic package Containers.Indefinite_Multiway_Trees is new. 

Inconsistencies With Ada 2012

8.b/4
{AI12-0035-1} Corrigendum: Defined some routines to “perform indefinite insertion”. This could mean that some calls to those routines would now raise Program_Error where they previously worked. However, this is extremely unlikely; see Inconsistencies With Ada 2012 in A.18.11 for details. 

Contents   Index   References   Search   Previous   Next 
Ada-Europe Ada 2005 and 2012 Editions sponsored in part by Ada-Europe