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/] [ttp43.C] - Blame information for rev 749

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 699 jeremybenn
// { dg-do assemble  }
2
 
3
template < class T, template  class E1, template  class E2 >
4
struct Add {
5
  Add(const E1& e1, const E2& e2) {}
6
};
7
 
8
 
9
template < class T, template  class E1, template  class E2 >
10
struct Mul {
11
  Mul(const E1& e1, const E2& e2) {}
12
};
13
 
14
 
15
template < class T >
16
struct Lit {
17
  Lit(const T& t) {}
18
};
19
 
20
 
21
template < class T >
22
struct Id {
23
  Add < T, ::Id, Lit > operator+(const T& t) const {
24
    return Add < T, ::Id, Lit >(*this, Lit(t));
25
  }
26
 
27
  Mul < T, ::Id, Lit > operator*(const T& t) const {
28
    return Mul < T, ::Id, Lit >(*this, Lit(t));
29
  }
30
};

powered by: WebSVN 2.1.0

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