Testcase from PR #3351

From-SVN: r44821
This commit is contained in:
Gabriel Dos Reis 2001-08-12 08:15:30 +00:00
parent 370df4c801
commit e7e0c3d412

View File

@ -0,0 +1,30 @@
// Contribued by Gabriel Dos Reis <gdr@codesourcery.com>
// Origin: iskey@i100.ryd.student.liu.se
// { dg-do link }
#include <iostream>
using namespace std;
template <class T> struct s;
template <class T>
ostream& operator<<(ostream &o, const typename s<T>::t &x)
{
return o;
}
template <class T>
struct s {
struct t
{
friend ostream&
operator<<<T>(ostream&, const typename s<T>::t &);
};
t x;
};
int main()
{
s<int>::t y;
cout << y;
}