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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.old-deja/] [g++.jason/] [tempinst1.C] - Rev 699

Compare with Previous | Blame | View Log

// { dg-do link  }
// { dg-options "-g" }
// Bug: g++ fails to instantiate operator<<.

struct ostream {
  ostream& operator<< (const char *) { return *this; };
};

template <class T> class foo;

template <class T> ostream& operator<< (ostream& ios, foo<T>&obj) {return ios;}

template <class T> class foo {
  friend ostream& operator<<<>(ostream&, foo<T>&);
};

int main()
{
  ostream cout;
  foo<int> foo_obj;
  cout << foo_obj; // causes linker error
  return 0;
} 

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.