Boost C++ Libraries: Ticket #11265: boost::algorithm::join produces incorrect results with char16_t https://svn.boost.org/trac10/ticket/11265 <p> 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. </p> <p> 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 </p> <p> I've attached a patched version of boost/range/as_literal.hpp and some reproduction code which demonstrates the issue. </p> <p> 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. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/11265 Trac 1.4.3 dave.lowell@… Mon, 04 May 2015 14:07:59 GMT attachment set https://svn.boost.org/trac10/ticket/11265 https://svn.boost.org/trac10/ticket/11265 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">as_literal_repro.cpp</span> </li> </ul> <p> reproduction code </p> Ticket dave.lowell@… Mon, 04 May 2015 14:13:06 GMT attachment set https://svn.boost.org/trac10/ticket/11265 https://svn.boost.org/trac10/ticket/11265 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">as_literal.hpp</span> </li> </ul> <p> patch </p> Ticket Marshall Clow Tue, 12 May 2015 20:58:59 GMT status changed https://svn.boost.org/trac10/ticket/11265#comment:1 https://svn.boost.org/trac10/ticket/11265#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">assigned</span> </li> </ul> <p> Thanks. I have reproduced this issue on Mac OS X using clang. </p> Ticket Marshall Clow Wed, 13 May 2015 03:39:17 GMT <link>https://svn.boost.org/trac10/ticket/11265#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/11265#comment:2</guid> <description> <p> Created <a class="ext-link" href="https://github.com/boostorg/range/pull/32"><span class="icon">​</span>https://github.com/boostorg/range/pull/32</a> to fix this. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Marshall Clow</dc:creator> <pubDate>Thu, 14 May 2015 03:08:59 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/11265#comment:3 https://svn.boost.org/trac10/ticket/11265#comment:3 <ul> <li><strong>status</strong> <span class="trac-field-old">assigned</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> Ticket