libstdc++/5492: basic_string allocator problem
Carlo Wood
carlo@alinoe.com
Fri Jan 25 15:46:00 GMT 2002
The following reply was made to PR libstdc++/5492; it has been noted by GNATS.
From: Carlo Wood <carlo@alinoe.com>
To: kk71878@hotmail.com
Cc: gcc-gnats@gcc.gnu.org
Subject: Re: libstdc++/5492: basic_string allocator problem
Date: Sat, 26 Jan 2002 00:38:09 +0100
On Fri, Jan 25, 2002 at 11:46:37AM -0600, kk71878@hotmail.com wrote:
> with gcc 3.0.3, but when the program is stopped and re-started (re-loading the
> data from the storage file, I get a valid basic_string object, but the data
> within it is not valid.
This sounds like a bug in the persistent object library,
what makes you think it is a bug in libstdc++?
> (my inclination is that
> basic_string's data is being allocated by the default allocator regardless
> of any allocator passed as a template parameter)
I have written a string class that replaces the allocator
and it works for me. You can see what I did by checking out
module libcwd from cvs and looking at the file private_allocator.h
and private_internal_string.h.
My first thought is that you have forgotten to define
a rebind<> member template.
For info on how to obtain libcwd from cvs, see
http://libcw.sourceforge.net/debugging/
Regards,
--
Carlo Wood <carlo@alinoe.com>
More information about the Gcc-prs
mailing list