[Boost-bugs] [Boost C++ Libraries] #11265: boost::algorithm::join produces incorrect results with char16_t

Subject: [Boost-bugs] [Boost C++ Libraries] #11265: boost::algorithm::join produces incorrect results with char16_t
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2015-05-04 14:04:30


#11265: boost::algorithm::join produces incorrect results with char16_t
------------------------------+-------------------------
 Reporter: dave.lowell@… | Owner: marshall
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: string_algo
  Version: Boost 1.56.0 | Severity: Problem
 Keywords: |
------------------------------+-------------------------
 Calling boost::algorithm::join on char16_t data silently produces
 corrupted results. This causes strings to have incorrect sizes. This
 appears to happen because char16_t is not recognized as a character
 literal type in boost/range/as_literal.hpp.

 It does recognize wchar_t, so this problem is not visible where char16_t
 may be converted to wchar_t. I've observed the problem on gcc 4.7

 I've attached a patched version of boost/range/as_literal.hpp and some
 reproduction code which demonstrates the issue.

 The reproduction code creates the string "aa,bb" once using string
 concatenation and once using join. With concatenation, the size of the
 string is 5 as expected. With join, the size is 6.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/11265>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:18 UTC