This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: G++ 3.3.1 Specialization bug?
- From: Jonathan Wakely <cow at compsoc dot man dot ac dot uk>
- To: Kirill Smelkov <kirr at landau dot phys dot spbu dot ru>
- Cc: Wu Yongwei <adah at netstd dot com>, gcc at gcc dot gnu dot org, libstdc++ at gcc dot gnu dot org
- Date: Mon, 1 Sep 2003 13:16:36 +0100
- Subject: Re: G++ 3.3.1 Specialization bug?
- References: <3F52AE97.4080108@netstd.com> <3F52F6B4.4070906@landau.phys.spbu.ru>
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