blob: e1ac27c31eec107d00ec9f2f4d478dbd27ffb900 (
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
29
30
31
32
33
34
35
36
37
38
39
40
41
|
-- { dg-do compile }
-- { dg-options "-O" }
with Ada.Containers.Ordered_Sets;
with Ada.Strings.Unbounded;
procedure Opt33 is
type Rec is record
Name : Ada.Strings.Unbounded.Unbounded_String;
end record;
function "<" (Left : Rec; Right : Rec) return Boolean;
package My_Ordered_Sets is new Ada.Containers.Ordered_Sets (Rec);
protected type Data is
procedure Do_It;
private
Set : My_Ordered_Sets.Set;
end Data;
function "<" (Left : Rec; Right : Rec) return Boolean is
begin
return False;
end "<";
protected body Data is
procedure Do_It is
procedure Dummy (Position : My_Ordered_Sets.Cursor) is
begin
null;
end;
begin
Set.Iterate (Dummy'Access);
end;
end Data;
begin
null;
end;
|