Re: [gtkmm] Glib::ustring bug?
- From: "Robert J. Hansen" <rjhansen inav net>
- To: Joe Yandle <jwy divisionbyzero com>
- Cc: Martin Schulze <MHL Schulze t-online de>, <gtkmm-list gnome org>
- Subject: Re: [gtkmm] Glib::ustring bug?
- Date: Wed, 4 Sep 2002 16:40:24 -0500 (CDT)
> I think you've missed the point about ustring::raw(). It does *not* return
> a C style string, so the fact that your code snippet worked under gcc-RH
When I see in the documentation that it returns a std::string reference,
the first thing that leaps into my head is "ah, it returns a std::string
version of its internal contents; I can use raw() to convert ustrings to
std::strings if the library I'm using requires them". Given that in the
API ref, raw() is listed right alongside c_str(), which works exactly as
the std::string c_str(), this doesn't seem like an unreasonable inference
to draw.
I am not saying the behavior needs to be fixed. I'm saying that this is
an unpleasant surprise for someone who is expecting the string returned by
raw() to be a useful std::string. If raw() does not return a usable
std::string (or, rather, if it's not guaranteed raw() returns a usable
std::string), I think that ought to be mentioned in the API ref.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]