
18 Sep
2006
18 Sep
'06
10:46 a.m.
Tomas Pecholt wrote:
Note that some of these have been already done by John Maddock as I can see in regex header-directory.
Yep, they're quite similar to this idea.
// some standard types: typedef unicode_iterator<std::string::iterator, wchar_t> utf8_iterator; typedef unicode_iterator<std::basic_string<short>::iterator, wchar_t> utf16_iterator; typedef std::wstring::iterator utf32_iterator;
typedef unicode_string<utf8_iterator> > utf8_string; typedef unicode_string<utf16_iterator> > utf16_string; typedef unicode_string<utf32_iterator> > utf32_string;
Note that wchar_t is *not* guarenteed to be 32-bits as you seem to be assuming here (it's not on windows for example). Just a heads up. John.