Boost logo

Boost :

Subject: Re: [boost] [General] Always treat std::strings as UTF-8
From: Chad Nelson (chad.thecomfychair_at_[hidden])
Date: 2011-01-21 12:20:14


On Thu, 20 Jan 2011 17:19:24 -0800
Mostafa <mostafa_working_away_at_[hidden]> wrote:

>>> On second thought, is there really a need to access the underlying
>>> data of utf8_t? [...]
>>
>> For interaction with functions that require std::string, and
>> presumably don't care about the encoding, it's convenient. Without
>> it, using the UTF classes with such a function requires calling the
>> std::string constructor with the element iterators. That's going to
>> be a major need for the foreseeable future.
>
> Would that be a bad thing? That is, forcing clients to call the
> std::string constructors with element iterators. I don't see it as
> a need, but more of a want. It's just a convenience for the clients
> with drawbacks for the interface, namely exposing implementation
> detail that doesn't need to be exposed.

It's a need if you want people to use the class. I, for instance, would
take one look at the requirements you outline, and how often I'd have
to use them in my current codebase, and say "no thanks" to the whole
idea.

-- 
Chad Nelson
Oak Circle Software, Inc.
*
*
*



Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk