aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.ext/comint1.C
blob: 78d99e6c357408f49c71f8957abad84c80857a68 (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
// Test that we can use mixins with COM classes.

struct A
{
  virtual int foo () = 0;
  virtual int bar () = 0;
} __attribute__((__com_interface__));

struct B
{
  virtual int baz () { return 5; }
};

struct C : public A, public B
{
  int foo () { return 0; }
  int bar () { return 1; }
};

int main ()
{
  C c;
  return c.foo ();
}