This is the mail archive of the gcc@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]

Re: C++ language lawyer question


Albert Chin wrote:
In the process of compiling KDE 3.2 on IRIX 6.5 and Tru64 UNIX 5.1
with the respective vendor C++ compilers, I ran into a namespace
issue. Consider the following:

$ cat a.h
class KMAcctImap;

namespace KIO {
  class Job {
  public:
    int b;
  };
}

namespace KMail {
  class ImapJob {
    friend class KMAcctImap;
AFAICT [11.4]/9 indicates that this already means ::KMAcctImap,
You look for the name as normal, and then if not found inject
it into the innermost non-class scope (but in such a way that
regular name lookup won't find it until there's matching
declaration)

nathan

--
Nathan Sidwell    ::   http://www.codesourcery.com   ::     CodeSourcery LLC
nathan@codesourcery.com    ::     http://www.planetfall.pwp.blueyonder.co.uk



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