G++ 3.3.1 Specialization bug?
Jonathan Wakely
cow@compsoc.man.ac.uk
Mon Sep 1 12:16:00 GMT 2003
On Mon, Sep 01, 2003 at 11:35:16AM +0400, Kirill Smelkov wrote:
> Wu Yongwei wrote:
> >Carlo Wood wrote:
> [...]
> >>
> >>#define SGI_HASH_NAMESPACE __gnu_cxx
> >
> >
> >Yes, this is really the solution I use now (though I use the name SGI_EXT).
> >
> >>[snip]
> >
> >
> >Macros can solve the problem for now. But I want to see whether a more
> >"decent" solution exists. __gnu_cxx is really uglifying things (yes, I
> >know there are reasons for this :-) ).
> namespace SGI_EXT = __gnu_cxx;
A namespace alias is the method recommended by the libstdc++ docs:
http://gcc.gnu.org/onlinedocs/libstdc++/faq/index.html#5_4
but it doesn't solve the problem, as you can't specialise the type using
the namespace alias.
To specialise a template declared in __gnu_cxx you need to use the real
namespace name, or a macro that expands to the real name, not an alias
to that namespace and not a using declaration in another namespace.
Should the docs be changed to recommend using a macro? :-(
Or just mention that when specialising you can't use the aliased
namespace name?
jon
--
"All that we are is the result of what we have thought;
it is compounded of our thoughts, made up of our thoughts."
- Dhammapada, Verse I
More information about the Libstdc++
mailing list