|
Boost : |
From: Thorsten Ottosen (nesotto_at_[hidden])
Date: 2005-01-05 16:04:12
| > 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 would prefer these to be free-standing functions.
Was there something that prohibited that?
-Thorsten
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk