[C++ PATCH] Deprecate -ffriend-injection
[official-gcc.git] / gcc / testsuite / g++.dg / lookup / friend16.C
blobbb27773d7be6fb086fc9f9e14fea91d68a2af4d1
1 namespace std {
2   class ostream;
5 namespace N2 {
6   class C0 {};
9 std::ostream& operator<<( std::ostream& os_, const N2::C0& m_);
11 namespace N1 {
12   class C1 {
13     friend std::ostream& operator<<(std::ostream& os, const C1& what);
14   };
16   class C2 {
17     friend std::ostream& operator<<(std::ostream& os, const C2& what);
18   };
20   void foo(std::ostream & os, const N2::C0& m)
21   {
22     os << m; // Is this line valid?
23   }