id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 6886,Bugs in boost/regex/icu.hpp (patch included),Martin Baute ,John Maddock,"I am 100% sure I already reported these a couple of years ago (when 1.45 was current), but I just realized they haven't been fixed yet. In boost/regex/icu.hpp: Line 238 has a preprocessor #if that does special handling if BOOST_NO_MEMBER_TEMPLATES or __IBMCPP__ is defined. That's why the buggy code doesn't show itself on ""average"" machines. However, when trying to compile Boost.regex with ICU support on an AIX machine, compilation fails due to two bugs in the #else part of the code. The first bug is in line 314: typedef std::vector vector_type; The type is UChar32, not UCHAR32. The two templates before this one got it right, this template got it wrong. The second bug is in line 318: v.push_back((UCHAR32)(*i)); Same as above - should be UChar32. The third bug is a classic copy&paste error. In line 319: ++a; If you look at the surrounding code, there is no ""a"" defined here. The two previous templates define a 32-bit integer ""a"" by type-converting the ""i"" parameter (which is 8-bit in the first template and 16-bit in the second one), but in this third template ""i"" is 32-bit itself already, so there is no need to convert it. You see the surrounding ""while"" loop and the push_back() call using ""i"" directly, and the increment should do the same. The patch: 314c314 < typedef std::vector vector_type; --- typedef std::vector vector_type; 318,319c318,319 < v.push_back((UCHAR32)(*i)); < ++a; --- v.push_back((UChar32)(*i)); ++i; CVS Web link for ease of reference: http://boost.cvs.sourceforge.net/viewvc/boost/boost/boost/regex/icu.hpp?view=markup It would be nice if someone could commit this patch, because this bug has been around since v1.33... ",Bugs,closed,To Be Determined,regex,Boost 1.49.0,Problem,worksforme,,