This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: EEEEKS! The mangling changed!
On Saturday 29 November 2003 11:50 pm, Carlo Wood wrote:
> Is it a problem that you cannot refer to a __gnu_norm::list
> while in debug mode (from user code, when that is needed
> from the implementation itself then I am sure there is
> a way around that).
>
> Because if so (and the above is not usable), then in
> debug mode the coder needs to have:
>
> 1) std::list --> debug list
> 2) __gnu_norm::list --> normal list
>
> and that, and only that, cannot be done.
[snip]
> So, is it needed that the _user_ has access to __gnu_norm::
> in debug mode?
This is the problem, but it's not a user problem. __gnu_debug::list is a
wrapper around __gnu_norm::list, so both implementations need to coexist
otherwise the debug mode won't compile. So each debug-mode class template
looks like:
namespace __gnu_debug {
template<typename T, typename Allocator = std::allocator<T> >
class list : public __gnu_norm::list<T, Allocator>
{
// ...
};
}
Doug