1// { dg-do run } 2// Bug: g++ doesn't find the conversion from ostream_withassign to ostream. 3 4#include <iostream> 5 6template <class T> 7struct A { 8 T t; 9}; 10 11template <class T> 12std::ostream & operator<< (std::ostream & os, A<T> & a) 13{ 14 os << a.t; 15 return os; 16} 17 18int main () 19{ 20 A<int> a = { 1 }; 21 std::cout << a << std::endl; 22} 23 24