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

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [g++.old-deja/] [g++.mike/] [p5840.C] - Blame information for rev 338

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 305 jeremybenn
// { dg-do run  }
2
// prms-id: 5840
3
 
4
class Signal {
5
public:
6
  int Name(void) { return 1; }
7
};
8
 
9
class Derived : public Signal {
10
public:
11
  int Name(void) { return 2; }
12
};
13
 
14
template 
15
class Bar
16
{
17
public:
18
  int value (Foo* a) { return (a->*Id)(); }
19
};
20
 
21
/* The following line is illegal under the new rules for non-type
22
   template arguments in the standard, so it is commented out.  */
23
/* template class Bar ; */
24
template class Bar ;
25
template class Bar ;
26
 
27
Derived a;
28
 
29
/* Bar dispatcher1; */
30
Bar dispatcher2;
31
 
32
int main() {
33
  /* int i1 = dispatcher1.value(&a); */
34
  int i2 = dispatcher2.value(&a);
35
  return /* i1 != 1 || */ i2 != 2;
36
}

powered by: WebSVN 2.1.0

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