Boost logo

Boost :

Subject: Re: [boost] [locale] review part 2.1: source
From: Mathias Gaunard (mathias.gaunard_at_[hidden])
Date: 2011-04-10 12:19:16


On 10/04/2011 14:25, Artyom wrote:
>>
>>>> line 150: I think sresult.append(out_start, out_ptr);
>>>> would be slightly clearer.
>>>>
>>>
>>> I should look on it carefully whether I can change
>>> this.
>>>
>>> iconv API is very gentle in how it handles its pointers
>>> and states so I need to do everything carefully.
>>>
>>> Also I assume that append(Begin,End) may be less
>>> efficient then append(pointer,size) as it may be
>>> naively implemented as
>>>
>>> while(begin!=end)
>>> s += *begin++;
>>
>> Why make such assumptions that could very well be unfounded when it only
>> makes your code harder to understand?
>>
>
> I don't think so. I don't think that
>
> append(str,size)
>
> is less readable then
>
> append(str_begin,str_end)

I didn't read the incriminated piece of code, I was just inferring from
Steven's comment that it could be clearer.

If it's just this indeed there is no difference in clarity.


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