This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/25427] New: Impossible to create a friend function for a class in a namespace, outside the namespace.
- From: "sela_lerer at hotmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 15 Dec 2005 14:00:25 -0000
- Subject: [Bug c++/25427] New: Impossible to create a friend function for a class in a namespace, outside the namespace.
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Can not create a friend function for a class that is in a namespace, if the
function is not in this namespace.
Example:
Command Line:
g++ -save-temps main.cpp
Error:
main.cpp:12: error: ?std::ostream& operator<<(std::ostream&, S::A&)? should
have been declared inside ?::
--
Summary: Impossible to create a friend function for a class in a
namespace, outside the namespace.
Product: gcc
Version: 4.0.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: sela_lerer at hotmail dot com
GCC host triplet: i686-pc-Linux-gcc-c++-4.0.2-8.fc4
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25427