OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [ext/] [bases.C] - Blame information for rev 693

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
// { dg-options "-std=gnu++0x -w" }
2
// { dg-do run }
3
 
4
#include
5
#include
6
 
7
// A simple typelist
8
template struct types {};
9
 
10
// Simple bases implementation
11
template struct b {
12
  typedef types<__bases(T)...> type;
13
};
14
 
15
// Simple direct_bases implementation
16
template struct db {
17
  typedef types<__direct_bases(T)...> type;
18
};
19
 
20
template  struct assert_same_type;
21
template  struct assert_same_type {};
22
 
23
struct A {};
24
struct C : virtual A {};
25
struct D : public C {};
26
struct B : D, virtual A {};
27
struct E : C, virtual D, B {};
28
struct  F : A, B, E {};
29
 
30
int main() {
31
  assert_same_type::type, types>();
32
  assert_same_type::type, types>();
33
  assert_same_type::type, types<>>();
34
  return 0;
35
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.