A.18.1 The Package Containers
{
AI95-00302-03}
The package Containers is the root of the containers subsystem.
Static Semantics
{
AI95-00302-03}
The library package Containers has the following declaration:
package Ada.Containers
is
pragma Pure(Containers);
type Hash_Type
is mod implementation-defined;
type Count_Type is range 0 .. implementation-defined;
end Ada.Containers;
{
AI95-00302-03}
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.
Implementation Advice
{
AI95-00302-03}
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
2**31–1.
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
for Hash_Type'Modulus.
Extensions to Ada 95
{
AI95-00302-03}
{
extensions to Ada 95}
The package Containers
is new.