URL
https://opencores.org/ocsvn/scarts/scarts/trunk
Subversion Repositories scarts
[/] [scarts/] [trunk/] [toolchain/] [scarts-gcc/] [gcc-4.1.1/] [gcc/] [testsuite/] [g++.old-deja/] [g++.jason/] [template24.C] - Rev 12
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;
}