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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.old-deja/] [g++.pt/] [memtemp14.C] - Rev 853

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

// { dg-do link  }
// GROUPS passed templates membertemplates
extern "C" int printf (const char *, ...);

template <class T>
struct S
{
  template <class U, class V>
  void foo(U, V);
};


template <class T>
template <class U, class V>
void S<T>::foo(U, V)
{
  printf("Hello, world.\n");
}


int main()
{
  S<int> s;
  s.foo(3, 3);
  s.foo("hello", s);

  S<char*> s2;
  s2.foo(3, 3);
  s2.foo("hello", s);
}

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.