Index: boost/locale/utf.hpp =================================================================== --- boost/locale/utf.hpp (revision 77138) +++ boost/locale/utf.hpp (working copy) @@ -280,23 +280,23 @@ template static Iterator encode(code_point value,Iterator out) { - if(value <=0x7F) { - *out++ = value; + if(value <= 0x7F) { + *out++ = static_cast(value); } - else if(value <=0x7FF) { - *out++=(value >> 6) | 0xC0; - *out++=(value & 0x3F) | 0x80; + else if(value <= 0x7FF) { + *out++ = static_cast((value >> 6) | 0xC0); + *out++ = static_cast((value & 0x3F) | 0x80); } - else if(BOOST_LOCALE_LIKELY(value <=0xFFFF)) { - *out++=(value >> 12) | 0xE0; - *out++=((value >> 6) & 0x3F) | 0x80; - *out++=(value & 0x3F) | 0x80; + else if(BOOST_LOCALE_LIKELY(value <= 0xFFFF)) { + *out++ = static_cast((value >> 12) | 0xE0); + *out++ = static_cast(((value >> 6) & 0x3F) | 0x80); + *out++ = static_cast((value & 0x3F) | 0x80); } else { - *out++=(value >> 18) | 0xF0; - *out++=((value >> 12) & 0x3F) | 0x80; - *out++=((value >> 6) & 0x3F) | 0x80; - *out++=(value & 0x3F) | 0x80; + *out++ = static_cast((value >> 18) | 0xF0); + *out++ = static_cast(((value >> 12) & 0x3F) | 0x80); + *out++ = static_cast(((value >> 6) & 0x3F) | 0x80); + *out++ = static_cast((value & 0x3F) | 0x80); } return out; } @@ -380,12 +380,12 @@ static It encode(code_point u,It out) { if(BOOST_LOCALE_LIKELY(u<=0xFFFF)) { - *out++ = u; + *out++ = static_cast(u); } else { - u-=0x10000; - *out++=0xD800 | (u>>10); - *out++=0xDC00 | (u & 0x3FF); + u -= 0x10000; + *out++ = static_cast(0xD800 | (u>>10)); + *out++ = static_cast(0xDC00 | (u & 0x3FF)); } return out; } @@ -434,7 +434,7 @@ template static It encode(code_point u,It out) { - *out++ = u; + *out++ = static_cast(u); return out; }