This is the mail archive of the gcc-bugs@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]

return "" in bastring.h ?


Hi !

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.

  const charT* c_str () const
    { if (length () == 0) return ""; terminate (); return data (); }

I checked that CVS logs and saw that it was fixed temporarily in
revision 1.15 but reverted again in 1.16 with the following comment:

  revision 1.16
  date: 1999/02/20 12:21:51;  author: law;  state: Exp;  lines: +1 -2
          * string, std/straits.h, std/bastring.h: Revert recent
change.  Needs
          some libiberty support before it can be re-enabled.

Is there any final fix in sight ?

I'm currently hindered from replacing my home-grown Unicode string class
by STL due to this bug. Is there any way to work around it ? Any magic
conversion operator ?

Thanks,

Harri.

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