This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: return "" in bastring.h ?
- To: porten at tu-harburg dot de
- Subject: Re: return "" in bastring.h ?
- From: "Martin v. Loewis" <martin at loewis dot home dot cs dot tu-berlin dot de>
- Date: Wed, 15 Mar 2000 00:29:29 +0100
- CC: gcc-bugs at gcc dot gnu dot org
- References: <38CEBE69.72E414A1@tu-harburg.de>
> It's probably a known problem that the following code in std/bastring.h
> gives quite some problems when using different charT's than char.
Thanks for your bug report. I don't know if it is a known problem, but
it is unlikely to be fixed in libstdc++ v2. Please have a look at
libstdc++ v3, which implements c_str as
const _CharT*
c_str() const
{
// MT: This assumes concurrent writes are OK.
size_type __n = this->size();
traits_type::assign(_M_data()[__n], _Rep::_S_terminal);
return _M_data();
}
using a totally different string class, of course.
Regards,
Martin