This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ 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: Curious issue with char_traits


Howard Hinnant wrote:

> On Oct 25, 2005, at 11:21 AM, Paolo Carlini wrote:
>
>> Thanks a lot Howard! Indeed, I should have know, since one week ago I
>> read (enjoying it a lot!) Herb's paper on ADL... ;) I should really
>> double check and read it again together with your message (now I'm
>> running out for a few hours, sorry) but I gather that Herb's
>> modifications would avoid these trickeries, right?
>
>
> I'm not 100% up on Herb's ADL paper either.  Herb was kind enough to 
> walk me through it a couple of weeks ago, but I haven't fully 
> internalized it yet.  I do recall having some concerns about backward 
> compatibility, but now I don't remember the details.

I think that specifically one of his proposed modifications would avoid
this problem: he wants to stop considering as associated namespaces
those of *template arguments*: I think that in your examples basically
the problem comes from the Traits argument of basic_string, which is
std::char_traits, which, in turn has __gnu_cxx::char_traits as a base,
thus __gnu_cxx is searched.

Indeed, there are problems of backward compatibility, in my opinion too...

> In the meantime, we just need to practice good hygiene with respect 
> to identifiers, namespaces and ADL.  It all pretty much works until 
> you try to get too fancy. ;-)

Definitely.

Thanks again,
Paolo.


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