Boost logo

Boost :

From: Beman Dawes (bdawes_at_[hidden])
Date: 2005-01-06 20:09:13


At 03:05 PM 1/5/2005, Rob Stewart wrote:
>From: Beman Dawes <bdawes_at_[hidden]>
>>
>> 1. Hard-wired byte_string type in wstring_convert
>> -------------------------------------------------
>>
>> If this suggested change is accepted, it will probably make sense to
>rename
>> some wstring_convert members.
>
>You'll probably need to enumerate the changes you think are
>necessary to ensure good names are selected.

You are probably right. Perhaps I'll include a synopsis which shows all the
changes.

>
>> 3. Need target-argument form for wstring_convert conversion functions
>> ---------------------------------------------------------------------
>>
>> wstring_convert's conversion functions are in the form:
>>
>> byte_string to_bytes(const wide_string& wstr) const;
>>
>> While this form is often useful and should be retained, it may imply an

>> extra copy of the result if a compiler is not smart enough to optimize
the
>
>> copy away.
>> Suggested change is to add additional functions in the form:
>>
>> void to_bytes(const wide_string& wstr, byte_string & target)
const;
>
>I prefer output parameters to be first (due to the occasional
>need to have defaulted parameters and the desire to find output
>parameters in the same position relative to input parameters).
>Thus, without meaning to trigger a religious war, I propose this
>version instead:
>
> void to_bytes(byte_string & destination,
> wide_string const & source) const;

I personally prefer output first too, but was following the STL practice.
I'll mention your comment. Probably not worth talking about further here;
the LWG will make that decision.

Thanks for you comments,

--Beman


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