From: John Maddock (john_at_[hidden])
Date: 2006-09-18 12:46:53
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.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk