Boost logo

Boost :

Subject: Re: [boost] [General] Always treat std::strings as UTF-8
From: Mostafa (mostafa_working_away_at_[hidden])
Date: 2011-01-20 15:52:25

On Wed, 19 Jan 2011 18:44:44 -0800, Chad Nelson
<chad.thecomfychair_at_[hidden]> wrote:

> On Wed, 19 Jan 2011 14:32:31 -0800
> Mostafa <mostafa_working_away_at_[hidden]> wrote:
>>> operator* has a long history of providing the contents of a variable,
>>> even in C, and is a lot less typing to boot. But if you have any
>>> technical arguments against it, I'm listening.
>> Can we stick to std::string conventions as closely as possible? It
>> makes using whatever new string library that much easier, and clearer,
>> and maintainable.
> Is there a conventional way to get the data stored in an std::string? ;-)

On second thought, is there really a need to access the underlying data of
utf8_t? I argue that having a view of the underlying data via iterators
accomplishes just as much(*), and is more inline with the stl tradition of
containers and iterators, not to mention the better encapsulation it
affords the interface. Do clients really need to know, and potentially
develop a dependency on, the fact that utf8_t (for now?) is really just a
wrapper for std::string?

(*) Granted there are legacy/existing C and C++ interfaces that require C
style strings, and I guess that's what a potential utf8_t::c_str would be


Boost list run by bdawes at, gregod at, cpdaniel at, john at