Rationale Update for Ada 2012
Chapter 8: Containers
The container library was considerably enhanced in
Ada 2012. A few issues have arisen since.
The following Ada Issues
cover this area:
Accessibility checks for indefinite elements of containers
Inconsistency in Tree container definition
Definition of node for tree container is confusing
Tampering checks are performed first
These changes can be grouped as follows.
both address the same issue regarding the fact that the root node of
a tree has no element.
concerns problems with accessibility checks necessary to prevent dangling
references when using the indefinite containers.
addresses the question of when tampering checks are performed.
It is fundamental to the organization of trees that
each node of the tree has an associated element containing a value except
the root node which has no such associated element. Both AI-69
make various corrections to the wording such as to point out that an
iterator never visits the root node.
addresses the question of accessibility checks when manipulating indefinite
containers (these containers were introduced in Ada 2005).
Certain operations of instances of the indefinite container packages
require accessibility checks to prevent dangling references. The term
"perform indefinite insertion" is defined and then this is
used in the description of the various operations. Thus in the case of
we are told
, and Replace_Element
that have a parameter of the Element_Type
perform indefinite insertion.
concerns the order of making various checks. The conclusion is that tampering
checks are always performed before any other checks such as that for
© 2016 John Barnes Informatics.