OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 305 jeremybenn
// { dg-do run  }
2
template
3
class Set {
4
  public:
5
    typedef int (*Compare)(const T&, const T&);
6
    static Compare cmp1;
7
    static int (*cmp2)(const T&, const T&);
8
};
9
 
10
template
11
int gen_cmp(const T& a, const T& b) {
12
    if (a
13
    else if (a==b) return 0;
14
    else return 1;
15
}
16
 
17
template
18
typename Set::Compare Set::cmp1 = &gen_cmp;
19
 
20
template
21
int (*Set::cmp2)(const T&, const T&) = &gen_cmp;
22
 
23
int main() {
24
    Set s;
25
}

powered by: WebSVN 2.1.0

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