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] Impossible to create a friend function for a class in a namespace, outside the namespace.



------- Comment #6 from pinskia at gcc dot gnu dot org  2005-12-15 16:43 -------
(In reply to comment #5)
> Ok, but what about an inner class? If A had a public inner class B and the
> outer function had to operate on it?


The code is still invalid.  Just there is no simple work around except split
the class up like:
namespace S
{
  class A {
  class B;
  methods ....
};
}

function prototype to friend with;

class S::A::B
{
  friend function;
  methods;
};

function;


-- 

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


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