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: Advice on specialization in a different namespace


Paolo Carlini <pcarlini@unitus.it> writes:

| Hi all,
| 
| I'm almost done with moving all the exstensions already present in include/ext
| to namespace __gnu_cxx.
| 
| The only remaining problem I'm facing is the following: slist, hash_map and
| hash_set provide a specialization of insert_iterator, which, of course is still
| inside namespace std. This triggers errors when all of slist is inside
| __gnu_cxx, since, if I understand well the standard, it is not possible to
| specialize in a different namespace.
| 
| What do you suggest?

Hi Paolo,

Specializations for extensions, by the letter of the standard, should
remain in std::.  You can't do anything against that.   And actually,
there is no harm in putting those specializations in std::, since the
template arguments used in the specialisations unambigously identify
the entities being designated.  However we have to make sure those
specializations are not available in standard headers.

Since all that is an ABI change in the libary, we should probably put
words to that effect in the documentation. 

Thanks,

-- Gaby
CodeSourcery, LLC                       http://www.codesourcery.com


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