L : Natural renames HT.Lock;
begin
return R : constant Constant_Reference_Type :=
- (Element => Position.Node.Element.all'Access,
- Control =>
- (Controlled with Container'Unrestricted_Access))
+ (Element => Position.Node.Element.all'Access,
+ Control => (Controlled with Container'Unrestricted_Access))
do
B := B + 1;
L := L + 1;
L : Natural renames HT.Lock;
begin
return R : constant Constant_Reference_Type :=
- (Element => Node.Element.all'Access,
- Control =>
- (Controlled with Container'Unrestricted_Access))
+ (Element => Node.Element.all'Access,
+ Control => (Controlled with Container'Unrestricted_Access))
do
B := B + 1;
L := L + 1;
Position.Node.Key := new Key_Type'(Key);
+ declare
+ -- The element allocator may need an accessibility check in the
+ -- case the actual type is class-wide or has access discriminants
+ -- (see RM 4.8(10.1) and AI12-0035).
+
+ pragma Unsuppress (Accessibility_Check);
+
begin
Position.Node.Element := new Element_Type'(New_Item);
+
exception
when others =>
Free_Key (K);
K : Key_Access := new Key_Type'(Key);
E : Element_Access;
+ -- The element allocator may need an accessibility check in the case
+ -- the actual type is class-wide or has access discriminants (see
+ -- RM 4.8(10.1) and AI12-0035).
+
+ pragma Unsuppress (Accessibility_Check);
+
begin
E := new Element_Type'(New_Item);
return new Node_Type'(K, E, Next);
+
exception
when others =>
Free_Key (K);
B : Natural renames Container'Unrestricted_Access.all.HT.Busy;
begin
return It : constant Iterator :=
- (Limited_Controlled with
- Container => Container'Unrestricted_Access)
+ (Limited_Controlled with Container => Container'Unrestricted_Access)
do
B := B + 1;
end return;
L : Natural renames HT.Lock;
begin
return R : constant Reference_Type :=
- (Element => Position.Node.Element.all'Access,
- Control => (Controlled with Position.Container))
+ (Element => Position.Node.Element.all'Access,
+ Control => (Controlled with Position.Container))
do
B := B + 1;
L := L + 1;
L : Natural renames HT.Lock;
begin
return R : constant Reference_Type :=
- (Element => Node.Element.all'Access,
- Control =>
- (Controlled with Container'Unrestricted_Access))
+ (Element => Node.Element.all'Access,
+ Control => (Controlled with Container'Unrestricted_Access))
do
B := B + 1;
L := L + 1;
Node.Key := new Key_Type'(Key);
+ declare
+ -- The element allocator may need an accessibility check in the case
+ -- the actual type is class-wide or has access discriminants (see
+ -- RM 4.8(10.1) and AI12-0035).
+
+ pragma Unsuppress (Accessibility_Check);
+
begin
Node.Element := new Element_Type'(New_Item);
+
exception
when others =>
Free_Key (K);
declare
X : Element_Access := Position.Node.Element;
+ -- The element allocator may need an accessibility check in the case
+ -- the actual type is class-wide or has access discriminants (see
+ -- RM 4.8(10.1) and AI12-0035).
+
+ pragma Unsuppress (Accessibility_Check);
+
begin
Position.Node.Element := new Element_Type'(New_Item);
Free_Element (X);