------- Comment #3 from pinskia at gcc dot gnu dot org  2005-12-15 16:23 -------
This is invalid code, Comeau gives the following error:
"ComeauTest.c", line 12: error: the global scope has no "operator<<"
                        friend std::ostream & :: operator<<(std::ostream &os,A
&a);
                                                 ^
GCC's error could be better.

Anyways the way to fix it would to add the following before the namespace S:
namespace S{class A;}
std::ostream &operator<<(std::ostream &os,S::A &a);


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25427

Reply via email to