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++/52212] friend declaration doesn't see previous friend of same function


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

Jonathan Wakely <redi at gcc dot gnu.org> changed:

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

--- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-02-12 15:04:41 UTC ---
http://open-std.org/JTC1/SC22/WG21/docs/cwg_closed.html#209

you can make it valid by making D a friend of E, so that it can access the name
E::F

class D {
     class E{
         class F{};
         friend  void foo1(D::E::F& q);
         friend class D;
         };
     friend  void foo1(D::E::F& q);
     };

works with G++ and Comeau online and the online clang demo


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