We need to use Extended_Index for the Position parameter of the Element
function in formal vectors so it is compatible with other primitives of
the Iterable aspect.
gcc/ada/
* libgnat/a-cfinve.ads (Element): Change the type of the
Position parameter to Extended_Index.
* libgnat/a-cfinve.adb (Element): Idem.
* libgnat/a-cofove.ads (Element): Idem.
* libgnat/a-cofove.adb (Element): Idem.
function Element
(Container : Vector;
- Index : Index_Type) return Element_Type
+ Index : Extended_Index) return Element_Type
is
begin
if Index > Container.Last then
function Element
(Container : Vector;
- Index : Index_Type) return Element_Type
+ Index : Extended_Index) return Element_Type
with
Global => null,
Pre => Index in First_Index (Container) .. Last_Index (Container),
function Element
(Container : Vector;
- Index : Index_Type) return Element_Type
+ Index : Extended_Index) return Element_Type
is
begin
if Index > Container.Last then
function Element
(Container : Vector;
- Index : Index_Type) return Element_Type
+ Index : Extended_Index) return Element_Type
with
Global => null,
Pre => Index in First_Index (Container) .. Last_Index (Container),