This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC 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: G++ 3.3.1 Specialization bug?


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


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