URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Subversion Repositories openrisc_2011-10-31
[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [g++.old-deja/] [g++.pt/] [ttp43.C] - Rev 305
Compare with Previous | Blame | View Log
// { dg-do assemble }
template < class T, template <class> class E1, template <class> class E2 >
struct Add {
Add(const E1<T>& e1, const E2<T>& e2) {}
};
template < class T, template <class> class E1, template <class> class E2 >
struct Mul {
Mul(const E1<T>& e1, const E2<T>& e2) {}
};
template < class T >
struct Lit {
Lit(const T& t) {}
};
template < class T >
struct Id {
Add < T, ::Id, Lit > operator+(const T& t) const {
return Add < T, ::Id, Lit >(*this, Lit<T>(t));
}
Mul < T, ::Id, Lit > operator*(const T& t) const {
return Mul < T, ::Id, Lit >(*this, Lit<T>(t));
}
};