This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: Advice on specialization in a different namespace
- From: Gabriel Dos Reis <gdr at codesourcery dot com>
- To: Paolo Carlini <pcarlini at unitus dot it>
- Cc: libstdc++ at gcc dot gnu dot org, gdr at codesourcery dot com, bkoz at redhat dot com
- Date: 29 Dec 2001 15:19:02 +0100
- Subject: Re: Advice on specialization in a different namespace
- Organization: CodeSourcery, LLC
- References: <3C2DB695.14EBC5CE@unitus.it>
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