A.18.1 The Package Containers
The package Containers is the root of the containers subsystem.
The library package Containers has the following declaration:
Hash_Type is mod implementation-defined
Count_Type is range
0 .. implementation-defined
Hash_Type represents the range of the result of a hash function. Count_Type
represents the (potential or actual) number of elements of a container.
Implementation defined: The value of
Containers.Hash_Type'Modulus. The value of Containers.Count_Type'Last.
Capacity_Error is raised when the capacity of a container is exceeded.
Hash_Type'Modulus should be at least 2**32. Count_Type'Last should be
at least 2**31–1.
Implementation Advice: Containers.Hash_Type'Modulus
should be at least 2**32. Containers.Count_Type'Last should be at least
Discussion: This is not a requirement
so that these types can be declared properly on machines with native
sizes that are not 32 bits. For instance, a 24-bit target could use 2**24
Extensions to Ada 95
Incompatibilities With Ada 2005
Exception Capacity_Error is added to Containers.
If Containers is referenced in a use_clause
and an entity with the name Capacity_Error is defined in a package that
is also referenced in a use_clause
the entity Capacity_Error may no longer be use-visible, resulting in
errors. This should be rare and is easily fixed if it does occur.
Ada 2005 and 2012 Editions sponsored in part by Ada-Europe