summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gnat.dg/limited_with3_pkg1.ads
blob: 622b4fe49a8078999ecaea2a35c3d81c30a4f753 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
with Ada.Containers.Hashed_Maps;

generic

     type Object_Type is tagged private;

package Limited_With3_Pkg1 is

     type Key_Type is access all String;

     type Element_Type is new Object_Type with null record;

     type Element_Access is access all Element_Type;

     function Equal (Left, Right : Element_Access) return Boolean;

     function Equivalent_Keys (Left, Right : Key_Type) return Boolean;

     function Hash (Key : Key_Type) return Ada.Containers.Hash_Type;

     package Table_Package is new Ada.Containers.Hashed_Maps (
         Key_Type            => Key_Type,
         Element_Type        => Element_Access,
         Hash                => Hash,
         Equivalent_Keys     => Equivalent_Keys,
         "="                 => Equal);

end Limited_With3_Pkg1;