From: Benjamin Kosnik Date: Wed, 16 May 2001 01:59:01 +0000 (+0000) Subject: eb27.C: Convert. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5846d7f7349aebb0d8ab62f1e5ff339bf526f8ff;p=gcc.git eb27.C: Convert. 2001-05-15 Benjamin Kosnik * g++.old-deja/g++.robertl/eb27.C: Convert. From-SVN: r42126 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index e003fe14c95..5c3469f5163 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2001-05-15 Benjamin Kosnik + + * g++.old-deja/g++.robertl/eb27.C: Convert. + 2001-05-15 Nick Clifton * g++.dg/friend-warn.C: New test. Do not warn about friend diff --git a/gcc/testsuite/g++.old-deja/g++.robertl/eb27.C b/gcc/testsuite/g++.old-deja/g++.robertl/eb27.C index 31012bee0d8..3d32f1c0028 100644 --- a/gcc/testsuite/g++.old-deja/g++.robertl/eb27.C +++ b/gcc/testsuite/g++.old-deja/g++.robertl/eb27.C @@ -7,7 +7,7 @@ // for the test record_type. This is marked as an expected failure for now, // until we actually fix it. -#include +#include template class test; template test operator + (const test& a, const test& b); @@ -22,7 +22,7 @@ class test test (const T& a) { elem = a; }; test& operator += (const test& a) { elem += a.elem; return *this; }; friend test operator + <> (const test&, const test&); - friend ostream& operator << (ostream& os, const test& a) + friend std::ostream& operator << (std::ostream& os, const test& a) { return os << a.elem; }; }; @@ -34,6 +34,8 @@ test operator + (const test& a, const test& b) return c(a); int main() { test x, y; - x += 5; cout << x << endl; - y = x + test(2); cout << y << endl; + x += 5; + std::cout << x << std::endl; + y = x + test(2); + std::cout << y << std::endl; }