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++.jason/] [template25.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: 6393
3
// Bug: g++ is too lax in considering UPTs to be the same.
4
 
5
template 
6
class Bar
7
{
8
public:
9
  R do_bar (T arg);
10
};
11
 
12
 
13
template 
14
class Foo
15
{
16
  T i;
17
 
18
public:
19
  void do_foo () {}
20
  void do_foo (T const & t) {}
21
  void do_foo (Bar const & bar);  // {} Put the body here and it works
22
  void do_foo (Bar const & bar);     // {} Put the body here and it works
23
};
24
 
25
// These definitions don't work
26
 
27
template 
28
inline void Foo::
29
do_foo (Bar const & bar)
30
{}
31
 
32
template 
33
inline void Foo::
34
do_foo (Bar const & bar)
35
{}
36
 
37
 
38
int main ()
39
{ int i;
40
  Bar bar1;
41
  Bar  bar2;
42
  Foo foo;
43
  foo.do_foo();
44
  foo.do_foo(i);
45
  foo.do_foo(bar1);
46
  foo.do_foo(bar2);
47
 
48
  return 0;
49
}

powered by: WebSVN 2.1.0

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