This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/25427] New: Impossible to create a friend function for a class in a namespace, outside the namespace.


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]