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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [g++.dg/] [template/] [ttp25.C] - Rev 307

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

// { dg-do compile }
template<typename T, template<T> class C>
void f1(T, C<5>);

template<typename T, template<T> class C>
void f2(C<5>, T);

template<typename T, template<T> class C>
void f3(C<5>, T);

template<typename T> struct metafun { typedef T type; };

template<> struct metafun<short> { typedef int type; };

template<typename T, template<typename metafun<T>::type> class C>
void f4(T, C<5>);

template<int N> struct X {};
void g() {
  f1(5l, X<5>()); // { dg-error "no matching" }
  f2(X<5>(), 5);
  f3(X<5>(), 5l); // { dg-error "no matching" }
  f4(5, X<5>());
  f4(5l, X<5>()); // { dg-error "no matching" }
  f4((short)5, X<5>());
}

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

powered by: WebSVN 2.1.0

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