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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.old-deja/] [g++.pt/] [memtemp96.C] - Blame information for rev 699

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 699 jeremybenn
// { dg-do run  }
2
// Test for partial specialization of a member function template.
3
// Origin: Jason Merrill 
4
 
5
template  struct A {
6
  template  int f(U) { return 42; }
7
};
8
 
9
template <>
10
template 
11
int A::f(U);
12
 
13
template <>
14
template 
15
int A::f(U) { return 24; }
16
 
17
int main ()
18
{
19
  A ai;
20
  if (ai.f(0) != 42)
21
    return 1;
22
 
23
  A ad;
24
  if (ad.f(0) != 24)
25
    return 1;
26
 
27
  A ac;
28
  if (ac.f(0) != 36)
29
    return 1;
30
}
31
 
32
template <>
33
template 
34
int A::f(U) { return 36; }

powered by: WebSVN 2.1.0

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