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++.jason/] [template24.C] - Rev 154

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

// { dg-do run  }
// Bug: g++ doesn't find the conversion from ostream_withassign to ostream.

#include <iostream>

template <class T>
struct A {
  T t;
};

template <class T>
std::ostream & operator<< (std::ostream & os, A<T> & a)
{
  os << a.t;
  return os;
}

int main ()
{
  A<int> a = { 1 };
  std::cout << a << std::endl;
}

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.