C++ language lawyer question
Nathan Sidwell
nathan@codesourcery.com
Mon Mar 15 09:54:00 GMT 2004
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
More information about the Gcc
mailing list