ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> boost
boost
[boost] Re: name clash
by Gennaro Prota other posts by this author
Aug 18 2002 3:02PM messages near this date
[boost] name clash | [boost] Re: name clash
On 18 Aug 2002 15:06:29 +0200, Gabriel Dos Reis
<gdr@[...].net>  wrote:


> | > His compiler was right; somewhere, the standard says
> | >
> | > 3.3/4
> | >    Given a set of declarations in a single declarative region, each of
> | >    which specifies the same unqualified name,
> | 
> | Note: "unqualified name"
> 
> Yes, with the key phrase "in a single declarative region".

I don't know what the original question was, but Bo's reply makes me
think that he has misinterpreted that paragraph (of course, it's
likely that *I* did misinterpret it): it doesn't say that it applies
only when the declaration specifies an unqualified name. It applies
always but you have to see if the unqualified-ids are the same and not
the full qualified name. In practice (unless there's some special case
that I'm missing right now) you never declare a qualified name, just a
name. Example:


namespace N {
 class name;
}

namespace X {
 using N::name;
 typedef N::name name;
}

namespace N {
 class name {};
 using X::name;
}


All the declarations in namespace N ('class name;', 'class name {};'
and 'using X::name;') declare the same name (have the same
unqualified-id) and thus 3.3/4 applies, even if the name in the third
declaration is qualified. Analogously for the declarations in
namespace X.


Am I wrong?


Genny.



_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Thread:
Gabriel Dos Reis
Gennaro Prota
Bo Persson

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved