Ticket #6635 (closed Bugs: fixed)
Boost.Locale UTF encode function passes wrong type to output iterator
|Reported by:||jason.erb@…||Owned by:||artyom|
|Keywords:||Boost.Locale encode UTF||Cc:|
When passing a char output iterator (such as std::back_insert_iterator<std::string>) to boost::locale::utf::utf_traits<char>::encode, the compiler (Apple LLVM compiler 3.1 in Xcode 4.3 with extra warnings enabled) emits a warning about assigning unsigned int to char. The code incorrectly attempts to write the code unit to the output as a code_point instead of a CharType.
The attached patch performs a safe static cast of each code unit to CharType as it is written to the output iterator.
- Status changed from new to assigned
- Severity changed from Problem to Cosmetic
- Milestone changed from To Be Determined to Boost 1.50.0