Boost logo

Boost :

From: Thorsten Ottosen (nesotto_at_[hidden])
Date: 2005-01-05 16:07:24

| 1. Hard-wired byte_string type in wstring_convert
| -------------------------------------------------
| The underlying wstring_convert design seems flexible enough to cope with
| conversion between any two character types which meet std::basic_string
| requirements. Conversion is actually performed by std::codecvt, which is
| already parameterized by both internalT and externalT types. It seems
| artificial to restrict wstring_convert::byte_string to
| std::basic_string<char>. New character types such as the proposed char16_t
| and char32_t will need conversions to and from other wide types, yet with
| the current restriction wstring_convert could not be used for that purpose.
| Suggested change: replace
| typedef std::basic_string<char> byte_string;
| with:
| typedef std::basic_string<typename Codecvt::extern_type> byte_string;
| and change from_bytes argument types accordingly.
| If this suggested change is accepted, it will probably make sense to rename
| some wstring_convert members.

hm...why not remove the dependency of std::basic_string altogether and make
it a template parameter. Preferable, the template parameter is just
a ForwardRange FR with the requirement that a specialixation
of std::char_traits exists for range_value<FR>::type.


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