Boost logo

Boost :

From: Maxim Yegorushkin (maxim.yegorushkin_at_[hidden])
Date: 2005-08-16 02:54:03


On Sat, 13 Aug 2005 06:15:02 +0400, Cory Nelson <phrosty_at_[hidden]> wrote:

> There has been a good deal of talk on a Unicode library, but I havn't
> followed it much. I've been using http://dev.int64.org/snips/utf8.hpp
> for dealing with UTF-8. (caveat: expects wchar_t to be UTF-16 or
> UTF-32)

I've just checked out the source file and spotted:

ret=(
(((wchar_t)((*iter++)&0x0F)) << 12) |
(((wchar_t)((*iter++)&0x3F)) << 6) |
((wchar_t)((*iter++)&0x3F))
);

Aren't these increments in the expression source of UB because there are
no sequence points between them?

-- 
Maxim Yegorushkin

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