From: Gabriel Dos Reis Date: Sun, 12 Aug 2001 08:15:30 +0000 (+0000) Subject: Testcase from PR #3351 X-Git-Tag: prereleases/libstdc++-3.0.95~2713 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e7e0c3d41205edf1e5a0595bfc8d53f77a2df222;p=thirdparty%2Fgcc.git Testcase from PR #3351 From-SVN: r44821 --- diff --git a/gcc/testsuite/g++.dg/template/friend.C b/gcc/testsuite/g++.dg/template/friend.C new file mode 100644 index 000000000000..59564ad94372 --- /dev/null +++ b/gcc/testsuite/g++.dg/template/friend.C @@ -0,0 +1,30 @@ +// Contribued by Gabriel Dos Reis +// Origin: iskey@i100.ryd.student.liu.se +// { dg-do link } + +#include +using namespace std; + +template struct s; + +template +ostream& operator<<(ostream &o, const typename s::t &x) +{ + return o; +} + +template +struct s { + struct t + { + friend ostream& + operator<<(ostream&, const typename s::t &); + }; + t x; +}; + +int main() +{ + s::t y; + cout << y; +}